|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
com.sleepycat.bdb.util.FastInputStream
public class FastInputStream
A replacement for ByteArrayInputStream that does not synchronize every byte read.
| Field Summary | |
|---|---|
protected byte[] |
buf
|
protected int |
len
|
protected int |
mark
|
protected int |
off
|
| Constructor Summary | |
|---|---|
FastInputStream(byte[] buffer)
Creates an input stream. |
|
FastInputStream(byte[] buffer,
int offset,
int length)
Creates an input stream. |
|
| Method Summary | |
|---|---|
int |
available()
|
byte[] |
getBufferBytes()
Returns the underlying data being read. |
int |
getBufferLength()
Returns the end of the buffer being read. |
int |
getBufferOffset()
Returns the offset at which data is being read from the buffer. |
void |
mark(int pos)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] toBuf)
|
int |
read(byte[] toBuf,
int offset,
int length)
|
void |
reset()
|
long |
skip(long count)
|
| Methods inherited from class java.io.InputStream |
|---|
close |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int len
protected int off
protected int mark
protected byte[] buf
| Constructor Detail |
|---|
public FastInputStream(byte[] buffer)
buffer - the data to read.
public FastInputStream(byte[] buffer,
int offset,
int length)
buffer - the data to read.offset - the byte offset at which to begin reading.length - the number of bytes to read.| Method Detail |
|---|
public int available()
available in class java.io.InputStreampublic boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int pos)
mark in class java.io.InputStreampublic void reset()
reset in class java.io.InputStreampublic long skip(long count)
skip in class java.io.InputStream
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] toBuf)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] toBuf,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic byte[] getBufferBytes()
public int getBufferOffset()
public int getBufferLength()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||