org.eclipse.jgit.util.io
Class EolCanonicalizingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.eclipse.jgit.util.io.EolCanonicalizingInputStream
All Implemented Interfaces:
Closeable

public class EolCanonicalizingInputStream
extends InputStream

An input stream which canonicalizes EOLs bytes on the fly to '\n'. Note: Make sure to apply this InputStream only to text files!


Constructor Summary
EolCanonicalizingInputStream(InputStream in)
          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
 

Constructor Detail

EolCanonicalizingInputStream

public EolCanonicalizingInputStream(InputStream in)
Creates a new InputStream, wrapping the specified stream

Parameters:
in - raw input stream
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] bs,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException


Copyright © 2011. All Rights Reserved.