|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fernsroth.easyio.RandomAccessByteArray
public class RandomAccessByteArray
Constructor Summary | |
---|---|
RandomAccessByteArray(byte[] data)
constructor. |
Method Summary | |
---|---|
long |
getFilePointer()
gets the current location. |
long |
length()
gets the length. |
int |
read()
read a single byte. |
int |
read(byte[] buffer)
|
int |
read(byte[] buffer,
int off,
int len)
|
void |
seek(long newLocation)
sets the location. |
void |
setLength(long length)
sets the length. |
void |
write(byte[] buffer)
writes data. |
void |
write(byte[] buffer,
int start,
int length)
writes data. |
void |
write(int b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomAccessByteArray(byte[] data)
data
- the data.Method Detail |
---|
public void seek(long newLocation)
seek
in interface IRandomAccessSource
newLocation
- the location.public long getFilePointer()
getFilePointer
in interface IRandomAccessSource
public void write(int b)
write
in interface IOutputStream
b
- the data.public void write(byte[] buffer)
write
in interface IOutputStream
buffer
- the data to write.public void write(byte[] buffer, int start, int length)
write
in interface IOutputStream
buffer
- the data to write.start
- the start.length
- the length.public int read()
read
in interface IInputStream
public int read(byte[] buffer, int off, int len)
read
in interface IInputStream
buffer
- the buffer to put the data in.off
- the offset into buffer to start reading into.len
- the length to read.
public int read(byte[] buffer)
read
in interface IInputStream
buffer
- the buffer to read data into.
public void setLength(long length) throws java.io.IOException
setLength
in interface IRandomAccessSource
length
- the length.
java.io.IOException
public long length() throws java.io.IOException
length
in interface IRandomAccessSource
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |