fr.jussieu.gla.wasa.monitor.xml
Class BreakingInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--fr.jussieu.gla.wasa.monitor.xml.BreakingInputStream
- public class BreakingInputStream
- extends java.io.InputStream
Made public for tests. Behaves like its InputStream delegate
unless a pattern is found, then declares the end of the stream was found
until continueReading() is called. The
delegate then skips all skippable symbols for positioning at the
start of the next useful symbol sequence.
Performance issues : buffering is handled is an unefficient way
(for read( byte[] ...) methods).
Efficient buffering management would make implementation more complicated.
- Version:
- $Revision: 1.4 $ $Date: 2002/03/22 08:41:28 $
- Author:
- Laurent Caillette
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BreakingInputStream
public BreakingInputStream(java.io.InputStream delegate,
byte[][] breakPatterns)
continueReading
public void continueReading()
mayContinue
public boolean mayContinue()
read
public int read()
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
read
public int read(byte[] buffer)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
read
public int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
skip
public long skip(long n)
- Overrides:
skip in class java.io.InputStream
available
public int available()
throws java.io.IOException
- Overrides:
available in class java.io.InputStream
close
public void close()
throws java.io.IOException
- Overrides:
close in class java.io.InputStream
mark
public void mark(int readLimit)
- Overrides:
mark in class java.io.InputStream
reset
public void reset()
- Overrides:
reset in class java.io.InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class java.io.InputStream