it.geosolutions.imageio.stream.output
Class FilterImageOutputStream

Object
  extended by ImageInputStreamImpl
      extended by ImageOutputStreamImpl
          extended by FilterImageOutputStream
All Implemented Interfaces:
DataInput, DataOutput, ImageInputStream, ImageOutputStream

public class FilterImageOutputStream
extends ImageOutputStreamImpl
implements ImageOutputStream

Decorator class for decorating ImageOutputStream subclasses.

Author:
Simone Giannecchini, GeoSolutions

Field Summary
protected  ImageOutputStream ios
           
 
Fields inherited from class ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
 
Constructor Summary
FilterImageOutputStream(ImageOutputStream ios)
           
 
Method Summary
 void close()
           
 void flush()
           
 void flushBefore(long pos)
           
 int getBitOffset()
           
 ByteOrder getByteOrder()
           
 long getFlushedPosition()
           
 long getStreamPosition()
           
 boolean isCached()
           
 boolean isCachedFile()
           
 boolean isCachedMemory()
           
 void mark()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 int readBit()
           
 long readBits(int numBits)
           
 boolean readBoolean()
           
 byte readByte()
           
 void readBytes(IIOByteBuffer buf, int len)
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 void readFully(char[] c, int off, int len)
           
 void readFully(double[] d, int off, int len)
           
 void readFully(float[] f, int off, int len)
           
 void readFully(int[] i, int off, int len)
           
 void readFully(long[] l, int off, int len)
           
 void readFully(short[] s, int off, int len)
           
 int readInt()
           
 String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 long readUnsignedInt()
           
 int readUnsignedShort()
           
 String readUTF()
           
 void reset()
           
 void seek(long pos)
           
 void setBitOffset(int bitOffset)
           
 void setByteOrder(ByteOrder byteOrder)
           
 int skipBytes(int n)
           
 long skipBytes(long n)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 void writeBit(int bit)
           
 void writeBits(long bits, int numBits)
           
 void writeBoolean(boolean v)
           
 void writeByte(int v)
           
 void writeBytes(String s)
           
 void writeChar(int v)
           
 void writeChars(char[] c, int off, int len)
           
 void writeChars(String s)
           
 void writeDouble(double v)
           
 void writeDoubles(double[] d, int off, int len)
           
 void writeFloat(float v)
           
 void writeFloats(float[] f, int off, int len)
           
 void writeInt(int v)
           
 void writeInts(int[] i, int off, int len)
           
 void writeLong(long v)
           
 void writeLongs(long[] l, int off, int len)
           
 void writeShort(int v)
           
 void writeShorts(short[] s, int off, int len)
           
 void writeUTF(String s)
           
 
Methods inherited from class ImageOutputStreamImpl
flushBits
 
Methods inherited from class ImageInputStreamImpl
checkClosed, finalize, length
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ImageInputStream
length
 

Field Detail

ios

protected ImageOutputStream ios
Constructor Detail

FilterImageOutputStream

public FilterImageOutputStream(ImageOutputStream ios)
Method Detail

writeDouble

public void writeDouble(double v)
                 throws IOException
Specified by:
writeDouble in interface DataOutput
Specified by:
writeDouble in interface ImageOutputStream
Overrides:
writeDouble in class ImageOutputStreamImpl
Throws:
IOException

writeFloat

public void writeFloat(float v)
                throws IOException
Specified by:
writeFloat in interface DataOutput
Specified by:
writeFloat in interface ImageOutputStream
Overrides:
writeFloat in class ImageOutputStreamImpl
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

writeBit

public void writeBit(int bit)
              throws IOException
Specified by:
writeBit in interface ImageOutputStream
Overrides:
writeBit in class ImageOutputStreamImpl
Throws:
IOException

writeByte

public void writeByte(int v)
               throws IOException
Specified by:
writeByte in interface DataOutput
Specified by:
writeByte in interface ImageOutputStream
Overrides:
writeByte in class ImageOutputStreamImpl
Throws:
IOException

writeChar

public void writeChar(int v)
               throws IOException
Specified by:
writeChar in interface DataOutput
Specified by:
writeChar in interface ImageOutputStream
Overrides:
writeChar in class ImageOutputStreamImpl
Throws:
IOException

writeInt

public void writeInt(int v)
              throws IOException
Specified by:
writeInt in interface DataOutput
Specified by:
writeInt in interface ImageOutputStream
Overrides:
writeInt in class ImageOutputStreamImpl
Throws:
IOException

writeShort

public void writeShort(int v)
                throws IOException
Specified by:
writeShort in interface DataOutput
Specified by:
writeShort in interface ImageOutputStream
Overrides:
writeShort in class ImageOutputStreamImpl
Throws:
IOException

flushBefore

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

writeLong

public void writeLong(long v)
               throws IOException
Specified by:
writeLong in interface DataOutput
Specified by:
writeLong in interface ImageOutputStream
Overrides:
writeLong in class ImageOutputStreamImpl
Throws:
IOException

writeBits

public void writeBits(long bits,
                      int numBits)
               throws IOException
Specified by:
writeBits in interface ImageOutputStream
Overrides:
writeBits in class ImageOutputStreamImpl
Throws:
IOException

writeBoolean

public void writeBoolean(boolean v)
                  throws IOException
Specified by:
writeBoolean in interface DataOutput
Specified by:
writeBoolean in interface ImageOutputStream
Overrides:
writeBoolean in class ImageOutputStreamImpl
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Specified by:
write in interface DataOutput
Specified by:
write in interface ImageOutputStream
Overrides:
write in class ImageOutputStreamImpl
Throws:
IOException

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

writeChars

public void writeChars(char[] c,
                       int off,
                       int len)
                throws IOException
Specified by:
writeChars in interface ImageOutputStream
Overrides:
writeChars in class ImageOutputStreamImpl
Throws:
IOException

writeDoubles

public void writeDoubles(double[] d,
                         int off,
                         int len)
                  throws IOException
Specified by:
writeDoubles in interface ImageOutputStream
Overrides:
writeDoubles in class ImageOutputStreamImpl
Throws:
IOException

writeFloats

public void writeFloats(float[] f,
                        int off,
                        int len)
                 throws IOException
Specified by:
writeFloats in interface ImageOutputStream
Overrides:
writeFloats in class ImageOutputStreamImpl
Throws:
IOException

writeInts

public void writeInts(int[] i,
                      int off,
                      int len)
               throws IOException
Specified by:
writeInts in interface ImageOutputStream
Overrides:
writeInts in class ImageOutputStreamImpl
Throws:
IOException

writeLongs

public void writeLongs(long[] l,
                       int off,
                       int len)
                throws IOException
Specified by:
writeLongs in interface ImageOutputStream
Overrides:
writeLongs in class ImageOutputStreamImpl
Throws:
IOException

writeShorts

public void writeShorts(short[] s,
                        int off,
                        int len)
                 throws IOException
Specified by:
writeShorts in interface ImageOutputStream
Overrides:
writeShorts in class ImageOutputStreamImpl
Throws:
IOException

writeBytes

public void writeBytes(String s)
                throws IOException
Specified by:
writeBytes in interface DataOutput
Specified by:
writeBytes in interface ImageOutputStream
Overrides:
writeBytes in class ImageOutputStreamImpl
Throws:
IOException

writeChars

public void writeChars(String s)
                throws IOException
Specified by:
writeChars in interface DataOutput
Specified by:
writeChars in interface ImageOutputStream
Overrides:
writeChars in class ImageOutputStreamImpl
Throws:
IOException

writeUTF

public void writeUTF(String s)
              throws IOException
Specified by:
writeUTF in interface DataOutput
Specified by:
writeUTF in interface ImageOutputStream
Overrides:
writeUTF in class ImageOutputStreamImpl
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Specified by:
readByte in interface DataInput
Specified by:
readByte in interface ImageInputStream
Overrides:
readByte in class ImageInputStreamImpl
Throws:
IOException

readChar

public char readChar()
              throws IOException
Specified by:
readChar in interface DataInput
Specified by:
readChar in interface ImageInputStream
Overrides:
readChar in class ImageInputStreamImpl
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Specified by:
readDouble in interface DataInput
Specified by:
readDouble in interface ImageInputStream
Overrides:
readDouble in class ImageInputStreamImpl
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Specified by:
readFloat in interface DataInput
Specified by:
readFloat in interface ImageInputStream
Overrides:
readFloat in class ImageInputStreamImpl
Throws:
IOException

getBitOffset

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

read

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

readBit

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

readInt

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

readUnsignedByte

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

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Specified by:
readUnsignedShort in interface DataInput
Specified by:
readUnsignedShort in interface ImageInputStream
Overrides:
readUnsignedShort 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

readLong

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

readUnsignedInt

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

readShort

public short readShort()
                throws IOException
Specified by:
readShort in interface DataInput
Specified by:
readShort in interface ImageInputStream
Overrides:
readShort in class ImageInputStreamImpl
Throws:
IOException

close

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

flush

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

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

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

readBoolean

public boolean readBoolean()
                    throws IOException
Specified by:
readBoolean in interface DataInput
Specified by:
readBoolean in interface ImageInputStream
Overrides:
readBoolean in class ImageInputStreamImpl
Throws:
IOException

skipBytes

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

readBits

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

setBitOffset

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

skipBytes

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

seek

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

read

public int read(byte[] b)
         throws IOException
Specified by:
read in interface ImageInputStream
Overrides:
read in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(byte[] b)
               throws IOException
Specified by:
readFully in interface DataInput
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

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

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface DataInput
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(char[] c,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(double[] d,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(float[] f,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(int[] i,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(long[] l,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readFully

public void readFully(short[] s,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ImageInputStream
Overrides:
readFully in class ImageInputStreamImpl
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface DataInput
Specified by:
readLine in interface ImageInputStream
Overrides:
readLine in class ImageInputStreamImpl
Throws:
IOException

readUTF

public String readUTF()
               throws IOException
Specified by:
readUTF in interface DataInput
Specified by:
readUTF in interface ImageInputStream
Overrides:
readUTF in class ImageInputStreamImpl
Throws:
IOException

getByteOrder

public ByteOrder getByteOrder()
Specified by:
getByteOrder in interface ImageInputStream
Overrides:
getByteOrder in class ImageInputStreamImpl

setByteOrder

public void setByteOrder(ByteOrder byteOrder)
Specified by:
setByteOrder in interface ImageInputStream
Overrides:
setByteOrder in class ImageInputStreamImpl

readBytes

public void readBytes(IIOByteBuffer buf,
                      int len)
               throws IOException
Specified by:
readBytes in interface ImageInputStream
Overrides:
readBytes in class ImageInputStreamImpl
Throws:
IOException


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.