Class SeekableOutputStream
java.lang.Object
java.io.OutputStream
org.apache.xmlgraphics.image.codec.util.SeekableOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An
OutputStream
which can seek to an arbitrary offset.- Version:
- $Id$
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aSeekableOutputStream
from aRandomAccessFile
. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
SeekableOutputStream
Constructs aSeekableOutputStream
from aRandomAccessFile
. Unless otherwise indicated, all method invocations are fowarded to the underlyingRandomAccessFile
.- Parameters:
file
- TheRandomAccessFile
to which calls will be forwarded.- Throws:
IllegalArgumentException
- iffile
isnull
.
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
InvokesgetFD().sync()
on the underlyingRandomAccessFile
.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
getFilePointer
- Throws:
IOException
-
seek
- Throws:
IOException
-