net.ontopia.persistence.proxy
Class ContentInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by net.ontopia.persistence.proxy.ContentInputStream
All Implemented Interfaces:
java.io.Closeable

public class ContentInputStream
extends java.io.FilterInputStream

INTERNAL: InputStream that knows its length.

Since:
4.0

Field Summary
protected  boolean closed
           
protected  long length
           
protected  long lengthRead
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ContentInputStream(java.io.InputStream stream, long length)
           
 
Method Summary
 void close()
           
 long getLength()
           
 int read()
           
 int read(byte[] bbuf)
           
 int read(byte[] bbuf, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

length

protected long length

lengthRead

protected long lengthRead

closed

protected boolean closed
Constructor Detail

ContentInputStream

public ContentInputStream(java.io.InputStream stream,
                          long length)
Method Detail

getLength

public long getLength()

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

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

read

public int read(byte[] bbuf,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
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.FilterInputStream
Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.