public class AutoLFInputStream extends InputStream
This is the former EolCanonicalizingInputStream with a new name in order to have same naming for all LF / CRLF streams
Modifier and Type | Class and Description |
---|---|
static class |
AutoLFInputStream.IsBinaryException
A special exception thrown when
AutoLFInputStream is told to
throw an exception when attempting to read a binary file. |
Constructor and Description |
---|
AutoLFInputStream(InputStream in,
boolean detectBinary)
Creates a new InputStream, wrapping the specified stream
|
AutoLFInputStream(InputStream in,
boolean detectBinary,
boolean abortIfBinary)
Creates a new InputStream, wrapping the specified stream
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isBinary()
Whether the stream has detected as a binary so far.
|
int |
read() |
int |
read(byte[] bs,
int off,
int len) |
available, mark, markSupported, read, reset, skip
public AutoLFInputStream(InputStream in, boolean detectBinary)
in
- raw input streamdetectBinary
- whether binaries should be detectedpublic AutoLFInputStream(InputStream in, boolean detectBinary, boolean abortIfBinary)
in
- raw input streamdetectBinary
- whether binaries should be detectedabortIfBinary
- throw an IOException if the file is binarypublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] bs, int off, int len) throws IOException
read
in class InputStream
IOException
public boolean isBinary()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
Copyright © 2019 Eclipse JGit Project. All rights reserved.