Save This Page
Home » openjdk-7 » java » net » [javadoc | source]
    1   /*  ZNet - Java Compression Layer for a new Socket Factory
    2       Copyright (C) 1999, Free Software Rulez
    3   
    4       This program is free software; you can redistribute it and/or modify
    5       it under the terms of the GNU General Public License as published by
    6       the Free Software Foundation; either version 2 of the License, or
    7       (at your option) any later version.
    8   
    9       This program is distributed in the hope that it will be useful,
   10       but WITHOUT ANY WARRANTY; without even the implied warranty of
   11       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12       GNU General Public License for more details.
   13   
   14       You should have received a copy of the GNU General Public License
   15       along with this program; if not, write to the Free Software
   16       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   17   
   18           The author of this program may be contacted at morgiaclaudio@yahoo.it. */
   19   
   20   package java.net;
   21   
   22   import java.util.zip;
   23   
   24   /**
   25    * This interface models the common methods that every decompressor must provide
   26    * in order to be used as a "plugin" into the decompression layer.
   27    * The interface scheme is based on the {@link java.util.zip.Inflater Inflater}
   28    * class, the standard decompression engine available in every JVM.
   29    * If you want to provide a new decompression engine, you have to implement this
   30    * interface and pass the class name as the property <b>decompressor</b>:<br>
   31    * java -Ddecompressor=java.net.InflatingDecompressor ....
   32    * @see java.net.InflatingDecompressor
   33    * @author <a href="mailto:morgiaclaudio@yahoo.it">Claudio Morgia</a>
   34    * @version 1.0
   35    */
   36   public interface Decompressor {
   37       /**
   38        * @see java.util.zip.Inflater#end() end()
   39        */
   40       public void end();
   41   
   42       /**
   43        * @see java.util.zip.Inflater#finished() finished()
   44        */
   45       public boolean finished();
   46   
   47       /**
   48        * @see java.util.zip.Inflater#getAdler() getAdler()
   49        */
   50       public int getAdler();
   51   
   52       /**
   53        * @see java.util.zip.Inflater#getRemaining() getRemaining()
   54        */
   55       public int getRemaining();
   56   
   57       /**
   58        * @see java.util.zip.Inflater#getTotalIn() getTotalIn()
   59        */
   60       public int getTotalIn();
   61   
   62       /**
   63        * @see java.util.zip.Inflater#getTotalOut() getTotalOut()
   64        */
   65       public int getTotalOut();
   66   
   67       /**
   68        * @see java.util.zip.Inflater#inflate(byte[]) inflate(byte[])
   69        */
   70       public int inflate(byte[] b) throws DataFormatException;
   71   
   72       /**
   73        * @see java.util.zip.Inflater#inflate(byte[],int,int) inflate(byte[],int,int)
   74        */
   75       public int inflate(byte[] b, int off, int len) throws DataFormatException;
   76   
   77       /**
   78        * @see java.util.zip.Inflater#needsDictionary needsDictionary()
   79        */
   80       public boolean needsDictionary();
   81   
   82       /**
   83        * @see java.util.zip.Inflater#needsInput() needsInput()
   84        */
   85       public boolean needsInput();
   86   
   87       /**
   88        * @see java.util.zip.Inflater#reset() reset()
   89        */
   90       public void reset();
   91   
   92       /**
   93        * @see java.util.zip.Inflater#setDictionary(byte[]) setDictionary(byte[])
   94        */
   95       public void setDictionary(byte[] dic);
   96   
   97       /**
   98        * @see java.util.zip.Inflater#setDictionary(byte[],int,int) setDictionary(byte[],int,int)
   99        */
  100       public void setDictionary(byte[] dic, int off, int len);
  101   
  102       /**
  103        * @see java.util.zip.Inflater#setInput(byte[]) setInput(byte[])
  104        */
  105       public void setInput(byte[] b);
  106   
  107       /**
  108        * @see java.util.zip.Inflater#setInput(byte[],int,int) setInput(byte[],int,int)
  109        */
  110       public void setInput(byte[] b, int off, int len);
  111   }

Save This Page
Home » openjdk-7 » java » net » [javadoc | source]