public class SeekableOutputStream extends OutputStream
OutputStream
which can seek to an arbitrary offset.构造器和说明 |
---|
SeekableOutputStream(RandomAccessFile file)
Constructs a
SeekableOutputStream from a
RandomAccessFile . |
public SeekableOutputStream(RandomAccessFile file)
SeekableOutputStream
from a
RandomAccessFile
. Unless otherwise indicated,
all method invocations are fowarded to the underlying
RandomAccessFile
.file
- The RandomAccessFile
to which calls
will be forwarded.IllegalArgumentException
- if file
is
null
.public void write(int b) throws IOException
write
在类中 OutputStream
IOException
public void write(byte[] b) throws IOException
write
在类中 OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
在类中 OutputStream
IOException
public void flush() throws IOException
getFD().sync()
on the underlying
RandomAccessFile
.flush
在接口中 Flushable
flush
在类中 OutputStream
IOException
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 OutputStream
IOException
public long getFilePointer() throws IOException
IOException
public void seek(long pos) throws IOException
IOException
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.