Class ArchiveEntryInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.eclipse.birt.core.archive.RAInputStream
-
- org.eclipse.birt.core.archive.compound.ArchiveEntryInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ArchiveEntryInputStream extends RAInputStream
RAInputStream implementation based on the ArchiveEntry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
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.void
close()
long
getOffset()
long
length()
int
read()
int
read(byte[] b, int off, int len)
void
readFully(byte[] b, int off, int len)
int
readInt()
long
readLong()
void
refresh()
void
seek(long localPos)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
Description copied from class:RAInputStream
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.- Specified by:
available
in classRAInputStream
- Throws:
java.io.IOException
-
getOffset
public long getOffset() throws java.io.IOException
- Specified by:
getOffset
in classRAInputStream
- Throws:
java.io.IOException
-
length
public long length() throws java.io.IOException
- Specified by:
length
in classRAInputStream
- Throws:
java.io.IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws java.io.IOException
- Specified by:
readFully
in classRAInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
readInt
public int readInt() throws java.io.IOException
- Specified by:
readInt
in classRAInputStream
- Returns:
- Throws:
java.io.IOException
-
readLong
public long readLong() throws java.io.IOException
- Specified by:
readLong
in classRAInputStream
- Throws:
java.io.IOException
-
refresh
public void refresh() throws java.io.IOException
- Specified by:
refresh
in classRAInputStream
- Throws:
java.io.IOException
-
seek
public void seek(long localPos) throws java.io.IOException
- Specified by:
seek
in classRAInputStream
- Throws:
java.io.IOException
-
-