org.eclipse.jgit.util.io
Class AutoCRLFInputStream
java.lang.Object
java.io.InputStream
org.eclipse.jgit.util.io.AutoCRLFInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class AutoCRLFInputStream
- extends java.io.InputStream
An OutputStream that expands LF to CRLF.
Existing CRLF are not expanded to CRCRLF, but retained as is.
Optionally, a binary check on the first 8000 bytes is performed and in case
of binary files, canonicalization is turned off (for the complete file).
Constructor Summary |
AutoCRLFInputStream(java.io.InputStream in,
boolean detectBinary)
Creates a new InputStream, wrapping the specified stream |
Method Summary |
void |
close()
|
int |
read()
|
int |
read(byte[] bs,
int off,
int len)
|
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoCRLFInputStream
public AutoCRLFInputStream(java.io.InputStream in,
boolean detectBinary)
- Creates a new InputStream, wrapping the specified stream
- Parameters:
in
- raw input streamdetectBinary
- whether binaries should be detected- Since:
- 2.0
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] bs,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException
Copyright © 2013. All Rights Reserved.