class ImportFileInputStream
extends java.io.InputStream
seek(..) to position the stream at offset in the file.| Modifier and Type | Field and Description |
|---|---|
private long |
currentPosition |
private long |
fileLength |
private java.io.RandomAccessFile |
raf |
| Constructor and Description |
|---|
ImportFileInputStream(java.io.RandomAccessFile raf)
Create a
ImportFileInputStream object for
the given file. |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of bytes that can be read from this stream.
|
void |
close()
Closes this input stream and releases any associated resources
|
int |
read()
Reads a byte of data from this input stream.
|
int |
read(byte[] buf,
int offset,
int length)
Reads up to
length bytes of data from this input stream
into given array. |
(package private) void |
seek(long offset)
Sets the file offset at which the next read will occur.
|
private java.io.RandomAccessFile raf
private long currentPosition
private long fileLength
ImportFileInputStream(java.io.RandomAccessFile raf)
throws java.io.IOException
ImportFileInputStream object for
the given file.raf - file the stream reads from.java.io.IOException - if any I/O error occurs.void seek(long offset) throws java.io.IOException
offset - byte offset in the file.java.io.IOException - if an I/O error occurs.public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.public int read(byte[] buf,
int offset,
int length)
throws java.io.IOException
length bytes of data from this input stream
into given array. This method blocks until some input is
available.read in class java.io.InputStreambuf - the buffer into which the data is read.offset - the start offset of the data.length - the maximum number of bytes read.-1 if there is no more data because the end of
the file has been reached.java.io.IOException - if an I/O error occurs.public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.