Java Doc for DeflaterInputStream.java in  » 6.0-JDK-Core » Collections-Jar-Zip-Logging-regex » java » util » zip » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Collections Jar Zip Logging regex » java.util.zip 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.io.InputStream
      java.io.FilterInputStream
         java.util.zip.DeflaterInputStream

DeflaterInputStream
public class DeflaterInputStream extends FilterInputStream (Code)
Implements an input stream filter for compressing data in the "deflate" compression format.
version:
   1.7
since:
   1.6
author:
   David R Tribble (david@tribble.com)
See Also:   DeflaterOutputStream
See Also:   InflaterOutputStream
See Also:   InflaterInputStream


Field Summary
final protected  byte[]buf
     Input buffer for reading compressed data.
final protected  Deflaterdef
     Compressor for this stream.

Constructor Summary
public  DeflaterInputStream(InputStream in)
     Creates a new input stream with a default compressor and buffer size.
public  DeflaterInputStream(InputStream in, Deflater defl)
     Creates a new input stream with the specified compressor and a default buffer size.
public  DeflaterInputStream(InputStream in, Deflater defl, int bufLen)
     Creates a new input stream with the specified compressor and buffer size.

Method Summary
public  intavailable()
     Returns 0 after EOF has been reached, otherwise always return 1.
public  voidclose()
     Closes this input stream and its underlying input stream, discarding any pending uncompressed data.
public  voidmark(int limit)
     This operation is not supported.
public  booleanmarkSupported()
     Always returns false because this input stream does not support the DeflaterInputStream.mark mark() and DeflaterInputStream.reset reset() methods.
public  intread()
     Reads a single byte of compressed data from the input stream.
public  intread(byte[] b, int off, int len)
     Reads compressed data into a byte array.
public  voidreset()
     This operation is not supported.
public  longskip(long n)
     Skips over and discards data from the input stream. This method may block until the specified number of bytes are read and skipped.

Field Detail
buf
final protected byte[] buf(Code)
Input buffer for reading compressed data.



def
final protected Deflater def(Code)
Compressor for this stream.




Constructor Detail
DeflaterInputStream
public DeflaterInputStream(InputStream in)(Code)
Creates a new input stream with a default compressor and buffer size.
Parameters:
  in - input stream to read the uncompressed data to
throws:
  NullPointerException - if in is null



DeflaterInputStream
public DeflaterInputStream(InputStream in, Deflater defl)(Code)
Creates a new input stream with the specified compressor and a default buffer size.
Parameters:
  in - input stream to read the uncompressed data to
Parameters:
  defl - compressor ("deflater") for this stream
throws:
  NullPointerException - if in or defl is null



DeflaterInputStream
public DeflaterInputStream(InputStream in, Deflater defl, int bufLen)(Code)
Creates a new input stream with the specified compressor and buffer size.
Parameters:
  in - input stream to read the uncompressed data to
Parameters:
  defl - compressor ("deflater") for this stream
Parameters:
  bufLen - compression buffer size
throws:
  IllegalArgumentException - if bufLen is <= 0
throws:
  NullPointerException - if in or defl is null




Method Detail
available
public int available() throws IOException(Code)
Returns 0 after EOF has been reached, otherwise always return 1.

Programs should not count on this method to return the actual number of bytes that could be read without blocking zero after the end of the underlying input stream has beenreached, otherwise always returns 1
throws:
  IOException - if an I/O error occurs or if this stream isalready closed




close
public void close() throws IOException(Code)
Closes this input stream and its underlying input stream, discarding any pending uncompressed data.
throws:
  IOException - if an I/O error occurs



mark
public void mark(int limit)(Code)
This operation is not supported.
Parameters:
  limit - maximum bytes that can be read before invalidating the position marker



markSupported
public boolean markSupported()(Code)
Always returns false because this input stream does not support the DeflaterInputStream.mark mark() and DeflaterInputStream.reset reset() methods. false, always



read
public int read() throws IOException(Code)
Reads a single byte of compressed data from the input stream. This method will block until some input can be read and compressed. a single byte of compressed data, or -1 if the end of theuncompressed input stream is reached
throws:
  IOException - if an I/O error occurs or if this stream isalready closed



read
public int read(byte[] b, int off, int len) throws IOException(Code)
Reads compressed data into a byte array. This method will block until some input can be read and compressed.
Parameters:
  b - buffer into which the data is read
Parameters:
  off - starting offset of the data within b
Parameters:
  len - maximum number of compressed bytes to read into b the actual number of bytes read, or -1 if the end of theuncompressed input stream is reached
throws:
  IndexOutOfBoundsException - if len > b.length - off
throws:
  IOException - if an I/O error occurs or if this input stream isalready closed



reset
public void reset() throws IOException(Code)
This operation is not supported.
throws:
  IOException - always thrown



skip
public long skip(long n) throws IOException(Code)
Skips over and discards data from the input stream. This method may block until the specified number of bytes are read and skipped. Note: While n is given as a long , the maximum number of bytes which can be skipped is Integer.MAX_VALUE .
Parameters:
  n - number of bytes to be skipped the actual number of bytes skipped
throws:
  IOException - if an I/O error occurs or if this stream isalready closed



Fields inherited from java.io.FilterInputStream
protected volatile InputStream in(Code)(Java Doc)

Methods inherited from java.io.FilterInputStream
public int available() throws IOException(Code)(Java Doc)
public void close() throws IOException(Code)(Java Doc)
public synchronized void mark(int readlimit)(Code)(Java Doc)
public boolean markSupported()(Code)(Java Doc)
public int read() throws IOException(Code)(Java Doc)
public int read(byte b) throws IOException(Code)(Java Doc)
public int read(byte b, int off, int len) throws IOException(Code)(Java Doc)
public synchronized void reset() throws IOException(Code)(Java Doc)
public long skip(long n) throws IOException(Code)(Java Doc)

Methods inherited from java.io.InputStream
public int available() throws IOException(Code)(Java Doc)
public void close() throws IOException(Code)(Java Doc)
public synchronized void mark(int readlimit)(Code)(Java Doc)
public boolean markSupported()(Code)(Java Doc)
abstract public int read() throws IOException(Code)(Java Doc)
public int read(byte b) throws IOException(Code)(Java Doc)
public int read(byte b, int off, int len) throws IOException(Code)(Java Doc)
public synchronized void reset() throws IOException(Code)(Java Doc)
public long skip(long n) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.