org.cip4.jdflib.util
Class PrefixInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.cip4.jdflib.util.PrefixInputStream
All Implemented Interfaces:
Closeable

public class PrefixInputStream
extends FilterInputStream

stream class that allows allows prefixing of a stream without requiring a copy

Author:
Rainer Prosi

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
PrefixInputStream(InputStream stream1, InputStream stream2)
           
PrefixInputStream(String prefix, InputStream stream2)
           
 
Method Summary
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixInputStream

public PrefixInputStream(InputStream stream1,
                         InputStream stream2)
Parameters:
stream1 -
stream2 -

PrefixInputStream

public PrefixInputStream(String prefix,
                         InputStream stream2)
Parameters:
prefix -
stream2 -
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException
See Also:
FilterInputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException
See Also:
FilterInputStream.read(byte[], int, int)

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException
See Also:
FilterInputStream.read(byte[])


Copyright © 2013. All Rights Reserved.