Class BatchingByteArrayScanner

java.lang.Object
io.datarouter.scanner.BaseScanner<R>
io.datarouter.scanner.BaseLinkedScanner<byte[],List<byte[]>>
io.datarouter.bytes.BatchingByteArrayScanner
All Implemented Interfaces:
io.datarouter.scanner.Scanner<List<byte[]>>, Closeable, AutoCloseable

public class BatchingByteArrayScanner extends io.datarouter.scanner.BaseLinkedScanner<byte[],List<byte[]>>
scanner that batches byte[]s into List<byte[]>s containing as many unbroken byte[]s as possible without exceeding maxOutputBytes total bytes. throws an exception if any input is larger than maxOutputBytes.
  • Field Summary

    Fields inherited from class io.datarouter.scanner.BaseLinkedScanner

    closed, input

    Fields inherited from class io.datarouter.scanner.BaseScanner

    current
  • Constructor Summary

    Constructors
    Constructor
    Description
    BatchingByteArrayScanner(io.datarouter.scanner.Scanner<byte[]> input, int maxOutputBytes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     

    Methods inherited from class io.datarouter.scanner.BaseLinkedScanner

    advance, close, closeInternal

    Methods inherited from class io.datarouter.scanner.BaseScanner

    current

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.datarouter.scanner.Scanner

    advanceUntil, advanceWhile, allMatch, anyMatch, append, append, append, apply, batch, batchByMinSize, collate, collate, collateV2, collect, collect, concat, concatIter, count, deduplicateConsecutive, deduplicateConsecutiveBy, deduplicateConsecutiveBy, distinct, distinctBy, each, exclude, findFirst, findLast, findMax, findMin, flush, forEach, groupBy, groupBy, groupBy, groupBy, hasAny, include, isEmpty, iterable, iterator, limit, link, list, listTo, map, maxN, minN, noneMatch, parallelOrdered, parallelOrdered, parallelUnordered, parallelUnordered, peekFirst, periodic, periodic, prefetch, reduce, reduce, retain, reverse, sample, shuffle, skip, sort, sort, splitBy, splitBy, stream, streamDoubles, streamInts, streamLongs, take, then, timeNanos, toArray, toMap, toMap, toMap, toMap, toMap, toMapSupplied, toMapSupplied, toMapSupplied, toMapSupplied
  • Constructor Details

    • BatchingByteArrayScanner

      public BatchingByteArrayScanner(io.datarouter.scanner.Scanner<byte[]> input, int maxOutputBytes)
  • Method Details

    • advanceInternal

      public boolean advanceInternal()
      Specified by:
      advanceInternal in class io.datarouter.scanner.BaseLinkedScanner<byte[],List<byte[]>>