public static List < Data > segment ( Data template , InputStream bytes ) throws IOException { return segment ( template , bytes , DEFAULT_SEGMENT_SIZE ) ; }
Segment a stream of bytes into a list of Data packets ; this must read all the bytes first in order to determine the end segment for FinalBlockId .