public class RAFolderOutputStream extends RAOutputStream
| 构造器和说明 |
|---|
RAFolderOutputStream(java.util.Collection<RAFolderOutputStream> manager,
java.io.File file) |
RAFolderOutputStream(java.util.Collection<RAFolderOutputStream> manager,
java.io.File file,
boolean append) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the stream.
|
void |
flush()
Flush the stream.
|
java.lang.String |
getName() |
long |
getOffset() |
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)
Same behavior as DataOutputStream.writeInt();
|
void |
writeLong(long v)
Same behavior as DataOutputStream.writeLong();
|
public RAFolderOutputStream(java.util.Collection<RAFolderOutputStream> manager, java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionpublic RAFolderOutputStream(java.util.Collection<RAFolderOutputStream> manager, java.io.File file, boolean append) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionpublic java.lang.String getName()
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 在类中 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 在类中 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 在类中 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 在类中 RAOutputStreamjava.io.IOExceptionpublic void writeLong(long v)
throws java.io.IOException
writeLong 在类中 RAOutputStreamjava.io.IOExceptionpublic long getOffset()
throws java.io.IOException
getOffset 在类中 RAOutputStreamjava.io.IOExceptionpublic void seek(long localPos)
throws java.io.IOException
seek 在类中 RAOutputStreamlocalPos - - the new local postion in the stream, measured in bytes from the
beginning of the streamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush 在接口中 java.io.Flushableflush 在类中 java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableclose 在类中 java.io.OutputStreamjava.io.IOExceptionpublic long length()
throws java.io.IOException
length 在类中 RAOutputStreamjava.io.IOExceptionCopyright © 2008 Actuate Corp. All rights reserved.