net.ontopia.persistence.proxy
Class ContentReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by net.ontopia.persistence.proxy.ContentReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class ContentReader
extends java.io.FilterReader

INTERNAL: Reader that knows its length.

Since:
4.0

Field Summary
protected  boolean closed
           
protected  long length
           
protected  long lengthRead
           
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
ContentReader(java.io.Reader reader, long length)
           
 
Method Summary
 void close()
           
 long getLength()
           
 int read()
           
 int read(char[] cbuf)
           
 int read(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.FilterReader
mark, markSupported, ready, reset, skip
 
Methods inherited from class java.io.Reader
read
 
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

ContentReader

public ContentReader(java.io.Reader reader,
                     long length)
Method Detail

getLength

public long getLength()

read

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

read

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

read

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


Copyright © 2000-2012 Ontopia.