code: public static List<Data> segment(Data template, InputStream bytes) throws IOException {
      return segment(template, bytes, DEFAULT_SEGMENT_SIZE);
    }
docs: 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.
  
  @param template the {@link Data} packet to use for the segment {@link Name}, {@link net.named_data.jndn.MetaInfo},
  etc.
  @param bytes an {@link InputStream} to the bytes to segment
  @return a list of segmented {@link Data} packets
  @throws IOException if the stream fails