org.apache.batik.ext.awt.image.codec.util

Class SeekableOutputStream

public class SeekableOutputStream extends OutputStream

An OutputStream which can seek to an arbitrary offset.
Constructor Summary
SeekableOutputStream(RandomAccessFile file)
Constructs a SeekableOutputStream from a RandomAccessFile.
Method Summary
voidclose()
voidflush()
Invokes getFD().sync() on the underlying RandomAccessFile.
longgetFilePointer()
voidseek(long pos)
voidwrite(int b)
voidwrite(byte[] b)
voidwrite(byte[] b, int off, int len)

Constructor Detail

SeekableOutputStream

public SeekableOutputStream(RandomAccessFile file)
Constructs a SeekableOutputStream from a RandomAccessFile. Unless otherwise indicated, all method invocations are fowarded to the underlying RandomAccessFile.

Parameters: file The RandomAccessFile to which calls will be forwarded.

Throws: IllegalArgumentException if file is null.

Method Detail

close

public void close()

flush

public void flush()
Invokes getFD().sync() on the underlying RandomAccessFile.

getFilePointer

public long getFilePointer()

seek

public void seek(long pos)

write

public void write(int b)

write

public void write(byte[] b)

write

public void write(byte[] b, int off, int len)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.