org.codehaus.swizzle.stream
Class TruncateInputStream
java.lang.Object
java.io.InputStream
org.codehaus.swizzle.stream.PushbackInputStream
org.codehaus.swizzle.stream.TruncateInputStream
- All Implemented Interfaces:
- java.io.Closeable, PushbackBuffer
public class TruncateInputStream
- extends PushbackInputStream
Reads from the underlying stream up until the token passed in.
After the token passed in is read, only -1 will be returned without
affecting the underlying stream.
- Version:
- $Revision$ $Date$
Methods inherited from class java.io.InputStream |
available, close, read, read, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TruncateInputStream
public TruncateInputStream(java.io.InputStream in,
java.lang.String end)
TruncateInputStream
public TruncateInputStream(java.io.InputStream delegate,
java.lang.String end,
boolean caseSensitive)
getEndToken
public java.lang.String getEndToken()
getNextByte
protected int getNextByte()
throws java.io.IOException
- Overrides:
getNextByte
in class PushbackInputStream
- Throws:
java.io.IOException
getBuffer
public byte[] getBuffer()
- Gets the current contents of the buffer
- Specified by:
getBuffer
in interface PushbackBuffer
- Overrides:
getBuffer
in class PushbackInputStream
Copyright © 2011 The Codehaus Foundation. All Rights Reserved.