info.monitorenter.cpdetector.io
Class InputStreamDebug
java.lang.Object
java.io.InputStream
info.monitorenter.cpdetector.io.InputStreamDebug
- All Implemented Interfaces:
- Closeable
public class InputStreamDebug
- extends InputStream
Prints m_out every character read. Use as a proxy. Only needed for debugging the ANTLR Parser (ParsingDetector).
Therefore the chronological order is preserved: sun's StreamDecoder.CharsetDS (nio) replaces InputStream.read() by
buffer operations that fetch complete arrays. This is avoided by allowing to fetch only one char per method call.
- Author:
- Achim Westermann
InputStreamDebug
public InputStreamDebug(InputStream delegate)
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
mark
public void mark(int readlimit)
- Overrides:
mark in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
read
public int read(byte[] b)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip in class InputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
Copyleft ㊢ 2003-2004 MPL 1.1, All Rights Footloose.