|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.eclipse.birt.core.archive.RAOutputStream
org.eclipse.birt.core.archive.RAFileOutputStream
public class RAFileOutputStream
This class is to be used by engine host (viewer), but not engine.
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
logger
the logger |
| Constructor Summary | |
|---|---|
RAFileOutputStream(java.io.RandomAccessFile parentFile,
long startPos)
|
|
| Method Summary | |
|---|---|
long |
getOffset()
|
long |
getStreamLength()
|
long |
length()
|
void |
seek(long localPos)
Same behavior as the seek in RandomAccessFile. |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array
to this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this output stream. |
void |
write(int b)
The same behavior as OutputStream.write(). |
void |
writeInt(int v)
|
void |
writeLong(long v)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
| Constructor Detail |
|---|
public RAFileOutputStream(java.io.RandomAccessFile parentFile,
long startPos)
parentFile - - underlying RandomAccess filestartPos - - the (global) position of the first character in parentFileendPos - - the (global) position of EOF mark (not a valid character in the file)| Method Detail |
|---|
public void write(int b)
throws java.io.IOException
write is that one byte is written
to the output stream. The byte to be written is the eight
low-order bits of the argument b. The 24
high-order bits of b are ignored.
Subclasses of OutputStream must provide an
implementation for this method.
write in class java.io.OutputStreamb - the byte.
java.io.IOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.
public void write(byte[] b)
throws java.io.IOException
b.length bytes from the specified byte array
to this output stream. The general contract for write(b)
is that it should have exactly the same effect as the call
write(b, 0, b.length).
write in class java.io.OutputStreamb - the data.
java.io.IOException - if an I/O error occurs.OutputStream.write(byte[], int, int)
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array
starting at offset off to this output stream.
The general contract for write(b, off, len) is that
some of the bytes in the array b are written to the
output stream in order; element b[off] is the first
byte written and b[off+len-1] is the last byte written
by this operation.
write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
java.io.IOException - if an I/O error occurs.
public void writeInt(int v)
throws java.io.IOException
writeInt in class RAOutputStreamjava.io.IOException
public void writeLong(long v)
throws java.io.IOException
writeLong in class RAOutputStreamjava.io.IOException
public void seek(long localPos)
throws java.io.IOException
seek in class RAOutputStreamlocalPos - - the new local postion in the stream, measured in bytes from the
beginning of the stream
java.io.IOException
public long getOffset()
throws java.io.IOException
getOffset in class RAOutputStreamjava.io.IOExceptionpublic long getStreamLength()
public long length()
throws java.io.IOException
length in class RAOutputStreamjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||