Package morfologik.tools
Class BinaryInput
- java.lang.Object
-
- morfologik.tools.BinaryInput
-
final class BinaryInput extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
BinaryInput.LineConsumer
-
Field Summary
Fields Modifier and Type Field Description private boolean
acceptBom
private boolean
acceptCr
private static java.lang.String
ARG_ACCEPT_BOM
private static java.lang.String
ARG_ACCEPT_CR
private static java.lang.String
ARG_IGNORE_EMPTY
private boolean
ignoreEmpty
-
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)
-
-
-
Field Detail
-
ARG_ACCEPT_BOM
private static final java.lang.String ARG_ACCEPT_BOM
- See Also:
- Constant Field Values
-
ARG_ACCEPT_CR
private static final java.lang.String ARG_ACCEPT_CR
- See Also:
- Constant Field Values
-
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
-
-
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
-
-