javax.imageio.stream
Class FileImageOutputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.ImageOutputStreamImpl
javax.imageio.stream.FileImageOutputStream
- All Implemented Interfaces:
- DataInput, DataOutput, ImageInputStream, ImageOutputStream
public class FileImageOutputStream
- extends ImageOutputStreamImpl
|
Method Summary |
void |
close()
|
long |
length()
|
int |
read()
|
int |
read(byte[] data,
int offset,
int len)
|
void |
seek(long position)
|
void |
write(byte[] data,
int offset,
int len)
Writes a region of data from an array into the stream. |
void |
write(int value)
Writes an int into the stream. |
| Methods inherited from class javax.imageio.stream.ImageOutputStreamImpl |
flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF |
| Methods inherited from class javax.imageio.stream.ImageInputStreamImpl |
checkClosed, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, setByteOrder, skipBytes, skipBytes |
| Methods inherited from interface javax.imageio.stream.ImageInputStream |
flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, setByteOrder, skipBytes, skipBytes |
FileImageOutputStream
public FileImageOutputStream(File file)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
FileImageOutputStream
public FileImageOutputStream(RandomAccessFile file)
close
public void close()
throws IOException
- Specified by:
close in interface ImageInputStream- Overrides:
close in class ImageInputStreamImpl
- Throws:
IOException
length
public long length()
- Specified by:
length in interface ImageInputStream- Overrides:
length in class ImageInputStreamImpl
read
public int read()
throws IOException
- Specified by:
read in interface ImageInputStream- Specified by:
read in class ImageInputStreamImpl
- Throws:
IOException
read
public int read(byte[] data,
int offset,
int len)
throws IOException
- Specified by:
read in interface ImageInputStream- Specified by:
read in class ImageInputStreamImpl
- Throws:
IOException
seek
public void seek(long position)
throws IOException
- Specified by:
seek in interface ImageInputStream- Overrides:
seek in class ImageInputStreamImpl
- Throws:
IOException
write
public void write(byte[] data,
int offset,
int len)
throws IOException
- Description copied from interface:
ImageOutputStream
- Writes a region of data from an array into the stream.
- Specified by:
write in interface DataOutput- Specified by:
write in interface ImageOutputStream- Specified by:
write in class ImageOutputStreamImpl
- Parameters:
data - the data to be writtenoffset - the offset in the arraylen - the length in the array
- Throws:
IOException - if an errror occurs
write
public void write(int value)
throws IOException
- Description copied from interface:
ImageOutputStream
- Writes an
int into the stream.
- Specified by:
write in interface DataOutput- Specified by:
write in interface ImageOutputStream- Specified by:
write in class ImageOutputStreamImpl
- Parameters:
value - the data to be written
- Throws:
IOException - if an errror occurs