Package org.eclipse.birt.core.archive
Class RAInputStream
java.lang.Object
java.io.InputStream
org.eclipse.birt.core.archive.RAInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ArchiveEntryInputStream
,RAFileInputStream
,RAFolderInputStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the number of bytes that can be read (or skipped over) from this random access input stream without blocking by the next caller of a method for this input stream.abstract long
abstract long
length()
abstract void
readFully
(byte[] b, int off, int len) abstract int
readInt()
abstract long
readLong()
abstract void
refresh()
abstract void
seek
(long localPos) Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
RAInputStream
public RAInputStream()
-
-
Method Details
-
seek
- Parameters:
localPos
-- Throws:
IOException
-
getOffset
- Throws:
IOException
-
length
- Throws:
IOException
-
readInt
- Returns:
- Throws:
IOException
-
readLong
- Throws:
IOException
-
readFully
- Throws:
IOException
-
refresh
- Throws:
IOException
-
available
Returns the number of bytes that can be read (or skipped over) from this random access input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread.This abstract class is extended by
RAFolderInputStream
andRAFileInputStream
The
available
method returns-1
when no more data because the end of the stream has been reached.and returns
Integer.MAX_VALUE
when bytes of data is larger then Integer.MAX_VALUE.- Overrides:
available
in classInputStream
- Throws:
IOException
-