public class PushbackInputStream extends InputStream implements PushbackBuffer
| Constructor and Description |
|---|
PushbackInputStream() |
PushbackInputStream(InputStream delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToMarkBuffer(byte b)
Add a byte to the mark buffer if mark is active
|
byte[] |
getBuffer()
Gets the current contents of the buffer without modifying the position.
|
InputStream |
getDelegate() |
protected int |
getNextByte() |
void |
mark(int readlimit)
Activate mark/reset buffer.
|
boolean |
markSupported() |
int |
read() |
void |
reset()
Push the mark/reset buffer onto the pushback buffer, and release the mark
|
void |
unmark()
Release current mark/reset buffer.
|
void |
unread(byte[] bytes)
Push the bytes on to the head of the buffer, so they are the next bytes
returned.
|
void |
unread(byte[] bytes,
int off,
int len)
Push the bytes on to the head of the buffer, so they are the next bytes
returned.
|
public PushbackInputStream()
public PushbackInputStream(InputStream delegate)
public InputStream getDelegate()
public int read()
throws IOException
read in class InputStreamIOExceptionprotected int getNextByte()
throws IOException
IOExceptionprotected void addToMarkBuffer(byte b)
public boolean markSupported()
markSupported in class InputStreampublic void mark(int readlimit)
mark in class InputStreamreadlimit - suggested mark buffer sizepublic void unmark()
public void reset()
reset in class InputStreampublic void unread(byte[] bytes)
PushbackBufferunread in interface PushbackBufferpublic void unread(byte[] bytes,
int off,
int len)
PushbackBufferunread in interface PushbackBufferpublic byte[] getBuffer()
PushbackBuffergetBuffer in interface PushbackBufferCopyright © 2016 The Codehaus Foundation. All rights reserved.