public abstract class AbstractBufferingStream extends java.lang.Object implements Stream
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
atEof |
protected byte[] |
buffer |
protected int |
bufferCursor |
protected int |
bufferRemaining |
protected boolean |
closed |
protected static int |
DEFAULT_READ_SIZE |
protected long |
offset |
| Constructor and Description |
|---|
AbstractBufferingStream() |
AbstractBufferingStream(long offset) |
AbstractBufferingStream(long offset,
int readSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
atEof() |
void |
close() |
abstract void |
doClose() |
abstract int |
doRead(byte[] b,
int off,
int len) |
abstract void |
doSeek(long offset) |
long |
getOffset() |
int |
read(byte[] b,
int off,
int len) |
long |
setOffset(long newOffset) |
protected static int DEFAULT_READ_SIZE
protected long offset
protected boolean closed
protected boolean atEof
protected byte[] buffer
protected int bufferRemaining
protected int bufferCursor
public AbstractBufferingStream()
public AbstractBufferingStream(long offset)
public AbstractBufferingStream(long offset,
int readSize)
public abstract int doRead(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic abstract void doSeek(long offset)
throws java.io.IOException
java.io.IOExceptionpublic abstract void doClose()
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
public long setOffset(long newOffset)
throws java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2019 The International Internet Preservation Consortium. All Rights Reserved.