Java Doc for Inflater.java in  » Apache-Harmony-Java-SE » java-package » java » util » zip » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.util.zip 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.zip.Inflater

Inflater
public class Inflater (Code)
The Inflater class is used to decompress bytes using the DEFLATE compression algorithm. Inflation is performed by the ZLIB compression library.
See Also:   DeflaterOutputStream
See Also:   Inflater


Field Summary
 intinLength
    
 intinRead
    

Constructor Summary
public  Inflater()
     Constructs a new Inflater instance.
public  Inflater(boolean noHeader)
     Constructs a new Inflater instance.

Method Summary
public synchronized  voidend()
     Release any resources associated with this Inflater.
protected  voidfinalize()
    
public synchronized  booleanfinished()
     Indicates if the Inflater has inflated the entire deflated stream.
public synchronized  intgetAdler()
     Returns the Adler32 checksum of either all bytes inflated, or the checksum of the preset dictionary if one has been supplied.
public synchronized  longgetBytesRead()
     Returns a long int of total number of bytes of input read by the Inflater.
public synchronized  longgetBytesWritten()
     Returns a long int of total number of bytes of input output by the Inflater.
public synchronized  intgetRemaining()
    
public synchronized  intgetTotalIn()
     Returns total number of bytes of input read by the Inflater.
public synchronized  intgetTotalOut()
     Returns total number of bytes of input output by the Inflater.
public  intinflate(byte[] buf)
     Inflates bytes from current input and stores them in buf.
public synchronized  intinflate(byte[] buf, int off, int nbytes)
     Inflates up to nbytes bytes from current input and stores them in buf starting at off.
public synchronized  booleanneedsDictionary()
     Indicates whether the input bytes were compressed with a preset dictionary.
public synchronized  booleanneedsInput()
     Answers whether more data is required in the input buffer.
public synchronized  voidreset()
     Resets the Inflater.
public synchronized  voidsetDictionary(byte[] buf)
     Sets the preset dictionary to be used for inflation.
public synchronized  voidsetDictionary(byte[] buf, int off, int nbytes)
     Sets the dictionary used to inflate the given data.
public synchronized  voidsetInput(byte[] buf)
     Sets the current input to buf.
public synchronized  voidsetInput(byte[] buf, int off, int nbytes)
     Sets the current input to the region of buf starting at off and ending at nbytes - 1.

Field Detail
inLength
int inLength(Code)



inRead
int inRead(Code)




Constructor Detail
Inflater
public Inflater()(Code)
Constructs a new Inflater instance.



Inflater
public Inflater(boolean noHeader)(Code)
Constructs a new Inflater instance. If noHeader is true the Inflater will not attempt to read a ZLIB header.
Parameters:
  noHeader - If true, read a ZLIB header from input.




Method Detail
end
public synchronized void end()(Code)
Release any resources associated with this Inflater. Any unused input/output is discarded. This is also called by the finalize method.



finalize
protected void finalize()(Code)



finished
public synchronized boolean finished()(Code)
Indicates if the Inflater has inflated the entire deflated stream. If deflated bytes remain and needsInput returns true this method will return false. This method should be called after all deflated input is supplied to the Inflater. True if all input has been inflated, false otherwise



getAdler
public synchronized int getAdler()(Code)
Returns the Adler32 checksum of either all bytes inflated, or the checksum of the preset dictionary if one has been supplied. The Adler32 checksum associated with this Inflater.



getBytesRead
public synchronized long getBytesRead()(Code)
Returns a long int of total number of bytes of input read by the Inflater. This method performs the same as getTotalIn except it returns a long value instead of an integer
See Also:   Inflater.getTotalIn() Total bytes read



getBytesWritten
public synchronized long getBytesWritten()(Code)
Returns a long int of total number of bytes of input output by the Inflater. This method performs the same as getTotalOut except it returns a long value instead of an integer
See Also:   Inflater.getTotalOut() Total bytes output



getRemaining
public synchronized int getRemaining()(Code)
Returns the number of bytes of current input remaining to be read by the inflater Number of bytes of unread input.



getTotalIn
public synchronized int getTotalIn()(Code)
Returns total number of bytes of input read by the Inflater. Total bytes read



getTotalOut
public synchronized int getTotalOut()(Code)
Returns total number of bytes of input output by the Inflater. Total bytes output



inflate
public int inflate(byte[] buf) throws DataFormatException(Code)
Inflates bytes from current input and stores them in buf.
Parameters:
  buf - Buffer to output inflated bytes Number of bytes inflated
exception:
  DataFormatException - If the underlying stream is corrupted or was not DEFLATED



inflate
public synchronized int inflate(byte[] buf, int off, int nbytes) throws DataFormatException(Code)
Inflates up to nbytes bytes from current input and stores them in buf starting at off.
Parameters:
  buf - Buffer to output inflated bytes
Parameters:
  off - Offset in buffer into which to store inflated bytes
Parameters:
  nbytes - Number of inflated bytes to store
exception:
  DataFormatException - If the underlying stream is corrupted or was not DEFLATED Number of bytes inflated



needsDictionary
public synchronized boolean needsDictionary()(Code)
Indicates whether the input bytes were compressed with a preset dictionary. This method should be called prior to inflate() to determine if a dictionary is required. If so setDictionary() should be called with the appropriate dictionary prior to calling inflate(). true if a preset dictionary is required for inflation.
See Also:   Inflater.setDictionary(byte[])
See Also:   Inflater.setDictionary(byte[],int,int)



needsInput
public synchronized boolean needsInput()(Code)
Answers whether more data is required in the input buffer. true if the input buffer is empty, and false otherwise.
See Also:   Inflater.setInput(byte[])



reset
public synchronized void reset()(Code)
Resets the Inflater.



setDictionary
public synchronized void setDictionary(byte[] buf)(Code)
Sets the preset dictionary to be used for inflation. needsDictionary() can be called to determine whether the current input was deflated using a preset dictionary.
Parameters:
  buf - The buffer containing the dictionary bytes
See Also:   Inflater.needsDictionary()



setDictionary
public synchronized void setDictionary(byte[] buf, int off, int nbytes)(Code)
Sets the dictionary used to inflate the given data. The dictionary should be set if the Inflater.inflate(byte[]) returned zero bytes inflated and Inflater.needsDictionary() returns true.
Parameters:
  buf - the bytes containing the dictionary
Parameters:
  off - offset into the buffer to the start of the dictionary
Parameters:
  nbytes - length of the dictionary, in bytes



setInput
public synchronized void setInput(byte[] buf)(Code)
Sets the current input to buf. This method should only be called if needsInput() returns true.
Parameters:
  buf - input buffer
See Also:   Inflater.needsInput



setInput
public synchronized void setInput(byte[] buf, int off, int nbytes)(Code)
Sets the current input to the region of buf starting at off and ending at nbytes - 1. This method should only be called if needsInput() returns true.
Parameters:
  buf - input buffer
Parameters:
  off - offset to read from in buffer
Parameters:
  nbytes - number of bytes to read
See Also:   Inflater.needsInput



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) 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.