it.geosolutions.imageio.plugins.ecw
Class ECWPImageInputStream

Object
  extended by ECWPImageInputStream
All Implemented Interfaces:
URIImageInputStream, DataInput, ImageInputStream

public class ECWPImageInputStream
extends Object
implements URIImageInputStream

A simple class which allow to handle ECWP protocol on GDAL. Actually, this shouldn't be used as a real ImageInputStream.

Author:
Daniele Romagnoli, GeoSolutions, Simone Giannecchini, GeoSolutions

Constructor Summary
ECWPImageInputStream(String ecwpUrl)
           
ECWPImageInputStream(URI uri)
           
 
Method Summary
 void close()
           
 void flush()
           
 void flushBefore(long pos)
           
 int getBitOffset()
           
 ByteOrder getByteOrder()
           
 String getECWPLink()
           
 long getFlushedPosition()
           
 long getStreamPosition()
           
 URI getUri()
           
 boolean isCached()
           
 boolean isCachedFile()
           
 boolean isCachedMemory()
           
 long length()
           
 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)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECWPImageInputStream

public ECWPImageInputStream(String ecwpUrl)

ECWPImageInputStream

public ECWPImageInputStream(URI uri)
Method Detail

getUri

public URI getUri()
Specified by:
getUri in interface URIImageInputStream

getECWPLink

public String getECWPLink()

close

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

flush

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

flushBefore

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

getBitOffset

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

getByteOrder

public ByteOrder getByteOrder()
Specified by:
getByteOrder in interface ImageInputStream

getFlushedPosition

public long getFlushedPosition()
Specified by:
getFlushedPosition in interface ImageInputStream

getStreamPosition

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

isCached

public boolean isCached()
Specified by:
isCached in interface ImageInputStream

isCachedFile

public boolean isCachedFile()
Specified by:
isCachedFile in interface ImageInputStream

isCachedMemory

public boolean isCachedMemory()
Specified by:
isCachedMemory in interface ImageInputStream

length

public long length()
            throws IOException
Specified by:
length in interface ImageInputStream
Throws:
IOException

mark

public void mark()
Specified by:
mark in interface ImageInputStream

read

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

read

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

read

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

readBit

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

readBits

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

readBoolean

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

readByte

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

readBytes

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

readChar

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

readDouble

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

readFloat

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

readFully

public void readFully(byte[] b)
               throws IOException
Specified by:
readFully in interface DataInput
Specified by:
readFully in interface ImageInputStream
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
Throws:
IOException

readFully

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

readFully

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

readFully

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

readFully

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

readFully

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

readFully

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

readInt

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

readLine

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

readLong

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

readShort

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

readUTF

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

readUnsignedByte

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

readUnsignedInt

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

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Specified by:
readUnsignedShort in interface DataInput
Specified by:
readUnsignedShort in interface ImageInputStream
Throws:
IOException

reset

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

seek

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

setBitOffset

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

setByteOrder

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

skipBytes

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

skipBytes

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


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.