Class BinaryInput


  • final class BinaryInput
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static interface  BinaryInput.LineConsumer  
    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryInput()  
      BinaryInput​(boolean acceptBom, boolean acceptCr, boolean ignoreEmpty)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static int forAllLines​(java.io.InputStream is, byte separator, BinaryInput.LineConsumer lineConsumer)
      Read all byte-separated sequences.
      private static boolean hasCr​(byte[] seq, int length)  
      (package private) java.util.List<byte[]> readBinarySequences​(java.nio.file.Path input, byte separator)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ARG_IGNORE_EMPTY

        private static final java.lang.String ARG_IGNORE_EMPTY
        See Also:
        Constant Field Values
      • acceptBom

        private boolean acceptBom
      • acceptCr

        private boolean acceptCr
      • ignoreEmpty

        private boolean ignoreEmpty
    • Constructor Detail

      • BinaryInput

        BinaryInput()
      • BinaryInput

        public BinaryInput​(boolean acceptBom,
                           boolean acceptCr,
                           boolean ignoreEmpty)
    • Method Detail

      • readBinarySequences

        java.util.List<byte[]> readBinarySequences​(java.nio.file.Path input,
                                                   byte separator)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • hasCr

        private static boolean hasCr​(byte[] seq,
                                     int length)
      • forAllLines

        private static int forAllLines​(java.io.InputStream is,
                                       byte separator,
                                       BinaryInput.LineConsumer lineConsumer)
                                throws java.io.IOException
        Read all byte-separated sequences.
        Throws:
        java.io.IOException