Java Doc for binascii.java in  » Scripting » jython » org » python » modules » 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 » Scripting » jython » org.python.modules 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.python.modules.binascii

binascii
public class binascii (Code)
The binascii.java module contains a number of methods to convert between binary and various ASCII-encoded binary representations. Normally, you will not use these modules directly but use wrapper modules like uu or hexbin instead, this module solely exists because bit-manipuation of large amounts of data is slow in Python.

The binascii.java module defines the following functions:

a2b_uu (string)
Convert a single line of uuencoded data back to binary and return the binary data. Lines normally contain 45 (binary) bytes, except for the last line. Line data may be followed by whitespace.

b2a_uu (data)
Convert binary data to a line of ASCII characters, the return value is the converted line, including a newline char. The length of data should be at most 45.

a2b_base64 (string)
Convert a block of base64 data back to binary and return the binary data. More than one line may be passed at a time.

b2a_base64 (data)
Convert binary data to a line of ASCII characters in base64 coding. The return value is the converted line, including a newline char. The length of data should be at most 57 to adhere to the base64 standard.

a2b_hqx (string)
Convert binhex4 formatted ASCII data to binary, without doing RLE-decompression. The string should contain a complete number of binary bytes, or (in case of the last portion of the binhex4 data) have the remaining bits zero.

rledecode_hqx (data)
Perform RLE-decompression on the data, as per the binhex4 standard. The algorithm uses 0x90 after a byte as a repeat indicator, followed by a count. A count of 0 specifies a byte value of 0x90. The routine returns the decompressed data, unless data input data ends in an orphaned repeat indicator, in which case the Incomplete exception is raised.

rlecode_hqx (data)
Perform binhex4 style RLE-compression on data and return the result.

b2a_hqx (data)
Perform hexbin4 binary-to-ASCII translation and return the resulting string. The argument should already be RLE-coded, and have a length divisible by 3 (except possibly the last fragment).

crc_hqx (data, crc)
Compute the binhex4 crc value of data, starting with an initial crc and returning the result.
Error
Exception raised on errors. These are usually programming errors.

Incomplete
Exception raised on incomplete data. These are usually not programming errors, but may be handled by reading a little more data and trying again.
The module is a line-by-line conversion of the original binasciimodule.c written by Jack Jansen, except that all mistakes and errors are my own.


author:
   Finn Bock, bckfnn@pipmail.dknet.dk
version:
   binascii.java,v 1.6 1999/02/20 11:37:07 fb Exp



Field Summary
final public static  PyStringError
    
final public static  PyStringIncomplete
    
public static  String__doc__
    
public static  PyString__doc__a2b_base64
    
public static  PyString__doc__a2b_hqx
    
public static  PyString__doc__a2b_uu
    
public static  PyString__doc__b2a_base64
    
public static  PyString__doc__b2a_hex
    
public static  PyString__doc__b2a_hqx
    
public static  PyString__doc__b2a_uu
    
public static  PyString__doc__crc_hqx
    
public static  PyString__doc__rlecode_hqx
    
public static  PyString__doc__rledecode_hqx
    
public static  PyStringa2b_hex$doc
    
static  long[]crc_32_tab
    


Method Summary
public static  Stringa2b_base64(String ascii_data)
     Convert a block of base64 data back to binary and return the binary data.
public static  Stringa2b_hex(String argbuf)
    
public static  PyTuplea2b_hqx(String ascii_data)
     Convert binhex4 formatted ASCII data to binary, without doing RLE-decompression.
public static  Stringa2b_uu(String ascii_data)
     Convert a single line of uuencoded data back to binary and return the binary data.
public static  Stringb2a_base64(String bin_data)
     Convert binary data to a line of ASCII characters in base64 coding.
public static  Stringb2a_hex(String argbuf)
    
public static  Stringb2a_hqx(String bin_data)
     Perform hexbin4 binary-to-ASCII translation and return the resulting string.
public static  Stringb2a_uu(String bin_data)
     Convert binary data to a line of ASCII characters, the return value is the converted line, including a newline char.
public static  intcrc32(String bin_data)
    
public static  intcrc32(String bin_data, long crc)
    
public static  intcrc_hqx(String bin_data, int crc)
     Compute the binhex4 crc value of data, starting with an initial crc and returning the result.
public static  Stringhexlify(String argbuf)
    
public static  Stringrlecode_hqx(String in_data)
     Perform binhex4 style RLE-compression on data and return the result.
public static  Stringrledecode_hqx(String in_data)
     Perform RLE-decompression on the data, as per the binhex4 standard.
public static  Stringunhexlify(String argbuf)
    

Field Detail
Error
final public static PyString Error(Code)



Incomplete
final public static PyString Incomplete(Code)



__doc__
public static String __doc__(Code)



__doc__a2b_base64
public static PyString __doc__a2b_base64(Code)



__doc__a2b_hqx
public static PyString __doc__a2b_hqx(Code)



__doc__a2b_uu
public static PyString __doc__a2b_uu(Code)



__doc__b2a_base64
public static PyString __doc__b2a_base64(Code)



__doc__b2a_hex
public static PyString __doc__b2a_hex(Code)



__doc__b2a_hqx
public static PyString __doc__b2a_hqx(Code)



__doc__b2a_uu
public static PyString __doc__b2a_uu(Code)



__doc__crc_hqx
public static PyString __doc__crc_hqx(Code)



__doc__rlecode_hqx
public static PyString __doc__rlecode_hqx(Code)



__doc__rledecode_hqx
public static PyString __doc__rledecode_hqx(Code)



a2b_hex$doc
public static PyString a2b_hex$doc(Code)



crc_32_tab
static long[] crc_32_tab(Code)





Method Detail
a2b_base64
public static String a2b_base64(String ascii_data)(Code)
Convert a block of base64 data back to binary and return the binary data. More than one line may be passed at a time.



a2b_hex
public static String a2b_hex(String argbuf)(Code)



a2b_hqx
public static PyTuple a2b_hqx(String ascii_data)(Code)
Convert binhex4 formatted ASCII data to binary, without doing RLE-decompression. The string should contain a complete number of binary bytes, or (in case of the last portion of the binhex4 data) have the remaining bits zero.



a2b_uu
public static String a2b_uu(String ascii_data)(Code)
Convert a single line of uuencoded data back to binary and return the binary data. Lines normally contain 45 (binary) bytes, except for the last line. Line data may be followed by whitespace.



b2a_base64
public static String b2a_base64(String bin_data)(Code)
Convert binary data to a line of ASCII characters in base64 coding. The return value is the converted line, including a newline char. The length of data should be at most 57 to adhere to the base64 standard.



b2a_hex
public static String b2a_hex(String argbuf)(Code)



b2a_hqx
public static String b2a_hqx(String bin_data)(Code)
Perform hexbin4 binary-to-ASCII translation and return the resulting string. The argument should already be RLE-coded, and have a length divisible by 3 (except possibly the last fragment).



b2a_uu
public static String b2a_uu(String bin_data)(Code)
Convert binary data to a line of ASCII characters, the return value is the converted line, including a newline char. The length of data should be at most 45.



crc32
public static int crc32(String bin_data)(Code)



crc32
public static int crc32(String bin_data, long crc)(Code)



crc_hqx
public static int crc_hqx(String bin_data, int crc)(Code)
Compute the binhex4 crc value of data, starting with an initial crc and returning the result.



hexlify
public static String hexlify(String argbuf)(Code)



rlecode_hqx
public static String rlecode_hqx(String in_data)(Code)
Perform binhex4 style RLE-compression on data and return the result.



rledecode_hqx
public static String rledecode_hqx(String in_data)(Code)
Perform RLE-decompression on the data, as per the binhex4 standard. The algorithm uses 0x90 after a byte as a repeat indicator, followed by a count. A count of 0 specifies a byte value of 0x90. The routine returns the decompressed data, unless data input data ends in an orphaned repeat indicator, in which case the Incomplete exception is raised.



unhexlify
public static String unhexlify(String argbuf)(Code)



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.