public class InputStreamReadOnlyAccessFile extends Object implements IReadOnlyAccess
IReadOnlyAccess interface.| Constructor and Description |
|---|
InputStreamReadOnlyAccessFile(InputStream is)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
public InputStreamReadOnlyAccessFile(InputStream is)
is - The input stream to wrap.public long getPosition()
throws IOException
getPosition in interface IReadOnlyAccessIOExceptionpublic void setPosition(long pos)
throws IOException
setPosition in interface IReadOnlyAccesspos - the position in the fileIOExceptionpublic int read()
throws IOException
IReadOnlyAccessread in interface IReadOnlyAccessIOExceptionpublic int read(byte[] buffer,
int off,
int count)
throws IOException
IReadOnlyAccessread in interface IReadOnlyAccessIOExceptionpublic int readFully(byte[] buffer,
int count)
throws IOException
IReadOnlyAccessreadFully in interface IReadOnlyAccessbuffer - where to store the read datacount - how many bytes to readIOExceptionpublic void close()
throws IOException
IReadOnlyAccessclose in interface IReadOnlyAccessIOExceptionCopyright © 2017. All rights reserved.