|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.junrar.io.ReadOnlyAccessByteArray
public class ReadOnlyAccessByteArray
A File like access to a byte array. (seek and read certain number of bytes)
| Constructor Summary | |
|---|---|
ReadOnlyAccessByteArray(byte[] file)
Initialize with byte[ ] |
|
| Method Summary | |
|---|---|
void |
close()
Close this file. |
long |
getPosition()
|
int |
read()
Read a single byte of data. |
int |
read(byte[] buffer,
int off,
int count)
Read up to count bytes to the specified buffer. |
int |
readFully(byte[] buffer,
int count)
Read exactly count bytes to the specified buffer. |
void |
setPosition(long pos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadOnlyAccessByteArray(byte[] file)
file - the file given as byte array| Method Detail |
|---|
public long getPosition()
throws IOException
getPosition in interface IReadOnlyAccessIOException
public void setPosition(long pos)
throws IOException
setPosition in interface IReadOnlyAccesspos - the position in the file
IOException
public int read()
throws IOException
read in interface IReadOnlyAccessIOException
public int read(byte[] buffer,
int off,
int count)
throws IOException
read in interface IReadOnlyAccessIOException
public int readFully(byte[] buffer,
int count)
throws IOException
IReadOnlyAccess
readFully in interface IReadOnlyAccessbuffer - where to store the read datacount - how many bytes to read
IOException
public void close()
throws IOException
IReadOnlyAccess
close in interface IReadOnlyAccessIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||