org.modeshape.common.util
Class SizeMeasuringReader
java.lang.Object
java.io.Reader
org.modeshape.common.util.SizeMeasuringReader
- All Implemented Interfaces:
- Closeable, Readable
public class SizeMeasuringReader
- extends Reader
An Reader
implementation that can wrap another input stream and determine the number of bytes read.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SizeMeasuringReader
public SizeMeasuringReader(Reader Reader,
AtomicLong size)
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
-
- Specified by:
read
in class Reader
- Throws:
IOException
- See Also:
Reader.read(char[], int, int)
read
public int read()
throws IOException
-
- Overrides:
read
in class Reader
- Throws:
IOException
- See Also:
Reader.read()
mark
public void mark(int readlimit)
throws IOException
-
- Overrides:
mark
in class Reader
- Throws:
IOException
- See Also:
Reader.mark(int)
markSupported
public boolean markSupported()
-
- Overrides:
markSupported
in class Reader
- See Also:
Reader.markSupported()
reset
public void reset()
throws IOException
-
- Overrides:
reset
in class Reader
- Throws:
IOException
- See Also:
Reader.reset()
close
public void close()
throws IOException
-
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Reader
- Throws:
IOException
- See Also:
Reader.close()
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.