it.geosolutions.imageio.stream.output
Class ImageOutputStreamAdapter

Object
  extended by ImageInputStreamImpl
      extended by ImageOutputStreamImpl
          extended by ImageOutputStreamAdapter
All Implemented Interfaces:
AccessibleStream<OutputStream>, DataInput, DataOutput, ImageInputStream, ImageOutputStream

public class ImageOutputStreamAdapter
extends ImageOutputStreamImpl
implements AccessibleStream<OutputStream>

Author:
Simone Giannecchini, GeoSolutions

Field Summary
 
Fields inherited from class ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
 
Constructor Summary
ImageOutputStreamAdapter(OutputStream os)
           
 
Method Summary
 void close()
           
 void flush()
           
 void flushBefore(long arg0)
           
 Class<OutputStream> getBinding()
          Retrieve the class for the target object.
 long getFlushedPosition()
           
 long getStreamPosition()
           
 OutputStream getTarget()
          Retrieves the target object on which we work.
 boolean isCached()
           
 boolean isCachedFile()
           
 boolean isCachedMemory()
           
 void mark()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 void seek(long arg0)
           
 int skipBytes(int arg0)
           
 long skipBytes(long arg0)
           
 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, getBitOffset, getByteOrder, length, 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, setBitOffset, setByteOrder
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ImageInputStream
getBitOffset, getByteOrder, length, 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, setBitOffset, setByteOrder
 

Constructor Detail

ImageOutputStreamAdapter

public ImageOutputStreamAdapter(OutputStream os)
Method Detail

flushBefore

public void flushBefore(long arg0)
                 throws IOException
Specified by:
flushBefore in interface ImageInputStream
Specified by:
flushBefore in interface ImageOutputStream
Overrides:
flushBefore in class ImageInputStreamImpl
Throws:
IOException

getFlushedPosition

public long getFlushedPosition()
Specified by:
getFlushedPosition in interface ImageInputStream
Overrides:
getFlushedPosition in class ImageInputStreamImpl

getStreamPosition

public long getStreamPosition()
                       throws IOException
Specified by:
getStreamPosition in interface ImageInputStream
Overrides:
getStreamPosition in class ImageInputStreamImpl
Throws:
IOException

isCached

public boolean isCached()
Specified by:
isCached in interface ImageInputStream
Overrides:
isCached in class ImageInputStreamImpl

isCachedFile

public boolean isCachedFile()
Specified by:
isCachedFile in interface ImageInputStream
Overrides:
isCachedFile in class ImageInputStreamImpl

isCachedMemory

public boolean isCachedMemory()
Specified by:
isCachedMemory in interface ImageInputStream
Overrides:
isCachedMemory in class ImageInputStreamImpl

mark

public void mark()
Specified by:
mark in interface ImageInputStream
Overrides:
mark in class ImageInputStreamImpl

reset

public void reset()
           throws IOException
Specified by:
reset in interface ImageInputStream
Overrides:
reset in class ImageInputStreamImpl
Throws:
IOException

seek

public void seek(long arg0)
          throws IOException
Specified by:
seek in interface ImageInputStream
Overrides:
seek in class ImageInputStreamImpl
Throws:
IOException

skipBytes

public int skipBytes(int arg0)
              throws IOException
Specified by:
skipBytes in interface DataInput
Specified by:
skipBytes in interface ImageInputStream
Overrides:
skipBytes in class ImageInputStreamImpl
Throws:
IOException

skipBytes

public long skipBytes(long arg0)
               throws IOException
Specified by:
skipBytes in interface ImageInputStream
Overrides:
skipBytes in class ImageInputStreamImpl
Throws:
IOException

write

public void write(int b)
           throws IOException
Specified by:
write in interface DataOutput
Specified by:
write in interface ImageOutputStream
Specified by:
write in class ImageOutputStreamImpl
Throws:
IOException
See Also:
ImageOutputStreamImpl.write(int)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Specified by:
write in interface DataOutput
Specified by:
write in interface ImageOutputStream
Specified by:
write in class ImageOutputStreamImpl
Throws:
IOException
See Also:
ImageOutputStreamImpl.write(byte[], int, int)

read

public int read()
         throws IOException
Specified by:
read in interface ImageInputStream
Specified by:
read in class ImageInputStreamImpl
Throws:
IOException
See Also:
ImageInputStreamImpl.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Specified by:
read in interface ImageInputStream
Specified by:
read in class ImageInputStreamImpl
Throws:
IOException
See Also:
ImageInputStreamImpl.read(byte[], int, int)

flush

public void flush()
           throws IOException
Specified by:
flush in interface ImageInputStream
Overrides:
flush in class ImageInputStreamImpl
Throws:
IOException
See Also:
ImageInputStreamImpl.flush()

close

public void close()
           throws IOException
Specified by:
close in interface ImageInputStream
Overrides:
close in class ImageInputStreamImpl
Throws:
IOException
See Also:
ImageInputStreamImpl.close()

getTarget

public OutputStream getTarget()
Description copied from interface: AccessibleStream
Retrieves the target object on which we work.

Specified by:
getTarget in interface AccessibleStream<OutputStream>
Returns:
the target object on which we work.

getBinding

public Class<OutputStream> getBinding()
Description copied from interface: AccessibleStream
Retrieve the class for the target object.

Specified by:
getBinding in interface AccessibleStream<OutputStream>
Returns:
the class for the target object.


Copyright © 2006–2018 GeoSolutions. All rights reserved.