|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectImageInputStreamImpl
ImageOutputStreamImpl
FileImageOutputStreamExtImpl
public class FileImageOutputStreamExtImpl
An implementation of ImageOutputStream
that take its output on a
File
.
Field Summary |
---|
Fields inherited from class ImageInputStreamImpl |
---|
bitOffset, byteOrder, flushedPos, streamPos |
Constructor Summary | |
---|---|
FileImageOutputStreamExtImpl(File file)
A constructor which accepts a File as input. |
|
FileImageOutputStreamExtImpl(File file,
int bufSize)
A constructor which accepts a File as input. |
Method Summary | |
---|---|
void |
close()
Closes the underlying EnhancedRandomAccessFile . |
void |
dispose()
Disposes this FileImageInputStreamExtImpl by closing its
underlying EnhancedRandomAccessFile . |
File |
getFile()
Retrieves the File we are connected to. |
long |
length()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
void |
seek(long pos)
Sets the current stream position and resets the bit offset to 0. |
String |
toString()
Provides a simple description for this ImageOutputStream . |
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class 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 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 class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ImageOutputStream |
---|
flushBefore, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF |
Methods inherited from interface 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 |
Constructor Detail |
---|
public FileImageOutputStreamExtImpl(File file) throws FileNotFoundException, IOException
eraf
-
FileNotFoundException
IOException
public FileImageOutputStreamExtImpl(File file, int bufSize) throws FileNotFoundException, IOException
eraf
- bufSize
-
FileNotFoundException
IOException
Method Detail |
---|
public int read() throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public void write(int b) throws IOException
write
in interface DataOutput
write
in interface ImageOutputStream
write
in class ImageOutputStreamImpl
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in interface ImageOutputStream
write
in class ImageOutputStreamImpl
IOException
public long length()
length
in interface ImageInputStream
length
in class ImageInputStreamImpl
public void seek(long pos) throws IOException
EOFException
will be thrown only if a read is performed. The eraf length will not be
increased until a write is performed.
seek
in interface ImageInputStream
seek
in class ImageInputStreamImpl
IndexOutOfBoundsException
- if pos
is smaller than the flushed
position.
IOException
- if any other I/O error occurs.public void close() throws IOException
EnhancedRandomAccessFile
.
close
in interface ImageInputStream
close
in class ImageInputStreamImpl
IOException
- in case something bad happens.public File getFile()
File
we are connected to.
getFile
in interface FileImageOutputStreamExt
File
public void dispose()
FileImageInputStreamExtImpl
by closing its
underlying EnhancedRandomAccessFile
.
public String toString()
ImageOutputStream
.
toString
in class Object
ImageOutputStream
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |