diff options
Diffstat (limited to 'libjava/javax/imageio/stream/FileImageOutputStream.java')
-rw-r--r-- | libjava/javax/imageio/stream/FileImageOutputStream.java | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/libjava/javax/imageio/stream/FileImageOutputStream.java b/libjava/javax/imageio/stream/FileImageOutputStream.java index 073faed..5b47af8 100644 --- a/libjava/javax/imageio/stream/FileImageOutputStream.java +++ b/libjava/javax/imageio/stream/FileImageOutputStream.java @@ -46,7 +46,7 @@ import java.io.RandomAccessFile; /** * @author Michael Koch (konqueror@gmx.de) */ -public class FileImageOutputStream +public class FileImageOutputStream extends ImageOutputStreamImpl { private RandomAccessFile file; @@ -87,4 +87,47 @@ public class FileImageOutputStream return -1L; } } + + public int read() + throws IOException + { + checkClosed(); + + setBitOffset(0); + return file.read(); + } + + public int read(byte[] data, int offset, int len) + throws IOException + { + checkClosed(); + + setBitOffset(0); + return file.read(data, offset, len); + } + + public void seek(long position) + throws IOException + { + super.seek(position); + file.seek(position); + } + + public void write(byte[] data, int offset, int len) + throws IOException + { + checkClosed(); + + flushBits(); + file.write(data, offset, len); + } + + public void write(int value) + throws IOException + { + checkClosed(); + + // FIXME: Flush pending bits. + file.write(value); + } } |