org.ow2.easywsdl.wsdl.util
Class InputStreamForker.ForkedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.ow2.easywsdl.wsdl.util.InputStreamForker.ForkedInputStream
All Implemented Interfaces:
java.io.Closeable
Enclosing class:
InputStreamForker

protected class InputStreamForker.ForkedInputStream
extends java.io.InputStream


Constructor Summary
InputStreamForker.ForkedInputStream()
           
 
Method Summary
 int available()
          
 void close()
           If both forked input streams are closed, the original input stream is closed.
 java.util.LinkedList<byte[]> getBufferList()
           
 boolean isClosed()
           
 boolean markSupported()
           
 int read()
           Reads the next byte of data from the input stream.
 int read(byte[] cbuf)
           
 int read(byte[] cbuf, int off, int len)
           
 void setOtherForkedInputStream(InputStreamForker.ForkedInputStream otherForkedInputStream)
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
mark, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamForker.ForkedInputStream

public InputStreamForker.ForkedInputStream()
Method Detail

setOtherForkedInputStream

public void setOtherForkedInputStream(InputStreamForker.ForkedInputStream otherForkedInputStream)

getBufferList

public java.util.LinkedList<byte[]> getBufferList()

isClosed

public boolean isClosed()

available

public int available()
              throws java.io.IOException

Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException

If both forked input streams are closed, the original input stream is closed.

If the forked stream has already been closed, this method has no effect.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

read

public int read()
         throws java.io.IOException

Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

The byte is read in the internal buffer. If no data is available in the internal buffer, the byte is read from the original input stream.

Specified by:
read in class java.io.InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
java.io.IOException - if an I/O error occurs.

read

public int read(byte[] cbuf)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException,
                 java.lang.IllegalArgumentException
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException
java.lang.IllegalArgumentException


Copyright © 2008-2010 Petals Link (previously EBM WebSourcing). All Rights Reserved.