Java Doc for ByteUtil.java in  » Database-Client » Jackcess » com » healthmarketscience » jackcess » 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 » Database Client » Jackcess » com.healthmarketscience.jackcess 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.healthmarketscience.jackcess.ByteUtil

ByteUtil
final public class ByteUtil (Code)
Byte manipulation and display utilities
author:
   Tim McCune




Method Summary
public static  intasUnsignedByte(byte b)
    
public static  voidclearRange(ByteBuffer buffer, int start, int end)
     Sets all bits in the given byte range to 0.
public static  voidfillRange(ByteBuffer buffer, int start, int end)
     Sets all bits in the given byte range to 1.
public static  intget3ByteInt(ByteBuffer buffer)
    
public static  intget3ByteInt(ByteBuffer buffer, ByteOrder order)
    
public static  intget3ByteInt(ByteBuffer buffer, int offset)
    
public static  intget3ByteInt(ByteBuffer buffer, int offset, ByteOrder order)
    
public static  intgetInt(ByteBuffer buffer, ByteOrder order)
    
public static  intgetInt(ByteBuffer buffer, int offset, ByteOrder order)
    
public static  intgetUnsignedByte(ByteBuffer buffer)
    
public static  intgetUnsignedByte(ByteBuffer buffer, int offset)
    
public static  booleanmatchesRange(ByteBuffer buffer, int start, byte[] pattern)
     Matches a pattern of bytes against the given buffer starting at the given offset.
public static  voidput3ByteInt(ByteBuffer buffer, int val)
     Put an integer into the given buffer at the given offset as a 3-byte integer.
public static  voidput3ByteInt(ByteBuffer buffer, int val, ByteOrder order)
     Put an integer into the given buffer at the given offset as a 3-byte integer.
public static  voidput3ByteInt(ByteBuffer buffer, int val, int offset, ByteOrder order)
     Put an integer into the given buffer at the given offset as a 3-byte integer.
public static  voidputInt(ByteBuffer buffer, int val, ByteOrder order)
    
public static  voidputInt(ByteBuffer buffer, int val, int offset, ByteOrder order)
    
public static  voidputRange(ByteBuffer buffer, int start, int end, byte b)
     Sets all bytes in the given byte range to the given byte value.
public static  voidtoHexFile(String fileName, ByteBuffer buffer, int offset, int size)
     Writes a chunk of data to a file in pretty printed hexidecimal.
public static  StringtoHexString(ByteBuffer buffer, int size)
    
public static  StringtoHexString(byte[] array)
    
public static  StringtoHexString(ByteBuffer buffer, int offset, int size)
    
public static  StringtoHexString(ByteBuffer buffer, int offset, int size, boolean formatted)
    
public static  voidwriteHexString(ByteBuffer buffer, String hexStr)
     Writes a sequence of hexidecimal values into the given buffer, where every two characters represent one byte value.



Method Detail
asUnsignedByte
public static int asUnsignedByte(byte b)(Code)
the byte value converted to an unsigned int value



clearRange
public static void clearRange(ByteBuffer buffer, int start, int end)(Code)
Sets all bits in the given byte range to 0.



fillRange
public static void fillRange(ByteBuffer buffer, int start, int end)(Code)
Sets all bits in the given byte range to 1.



get3ByteInt
public static int get3ByteInt(ByteBuffer buffer)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes The int



get3ByteInt
public static int get3ByteInt(ByteBuffer buffer, ByteOrder order)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes
Parameters:
  order - the order of the bytes of the int The int



get3ByteInt
public static int get3ByteInt(ByteBuffer buffer, int offset)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes
Parameters:
  offset - Offset at which to start reading the int The int



get3ByteInt
public static int get3ByteInt(ByteBuffer buffer, int offset, ByteOrder order)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes
Parameters:
  offset - Offset at which to start reading the int
Parameters:
  order - the order of the bytes of the int The int



getInt
public static int getInt(ByteBuffer buffer, ByteOrder order)(Code)

Parameters:
  buffer - Buffer containing the bytes
Parameters:
  order - the order of the bytes of the int an int from the current position in the given buffer, read usingthe given ByteOrder



getInt
public static int getInt(ByteBuffer buffer, int offset, ByteOrder order)(Code)

Parameters:
  buffer - Buffer containing the bytes
Parameters:
  offset - Offset at which to start reading the int
Parameters:
  order - the order of the bytes of the int an int from the given position in the given buffer, read usingthe given ByteOrder



getUnsignedByte
public static int getUnsignedByte(ByteBuffer buffer)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes The int



getUnsignedByte
public static int getUnsignedByte(ByteBuffer buffer, int offset)(Code)
Read a 3 byte int from a buffer
Parameters:
  buffer - Buffer containing the bytes
Parameters:
  offset - Offset at which to read the byte The int



matchesRange
public static boolean matchesRange(ByteBuffer buffer, int start, byte[] pattern)(Code)
Matches a pattern of bytes against the given buffer starting at the given offset.



put3ByteInt
public static void put3ByteInt(ByteBuffer buffer, int val)(Code)
Put an integer into the given buffer at the given offset as a 3-byte integer.
Parameters:
  buffer - buffer into which to insert the int
Parameters:
  val - Int to convert



put3ByteInt
public static void put3ByteInt(ByteBuffer buffer, int val, ByteOrder order)(Code)
Put an integer into the given buffer at the given offset as a 3-byte integer.
Parameters:
  buffer - buffer into which to insert the int
Parameters:
  val - Int to convert
Parameters:
  order - the order to insert the bytes of the int



put3ByteInt
public static void put3ByteInt(ByteBuffer buffer, int val, int offset, ByteOrder order)(Code)
Put an integer into the given buffer at the given offset as a 3-byte integer.
Parameters:
  buffer - buffer into which to insert the int
Parameters:
  val - Int to convert
Parameters:
  offset - offset at which to insert the int
Parameters:
  order - the order to insert the bytes of the int



putInt
public static void putInt(ByteBuffer buffer, int val, ByteOrder order)(Code)
Writes an int at the current position in the given buffer, using the given ByteOrder
Parameters:
  buffer - buffer into which to insert the int
Parameters:
  val - Int to insert
Parameters:
  order - the order to insert the bytes of the int



putInt
public static void putInt(ByteBuffer buffer, int val, int offset, ByteOrder order)(Code)
Writes an int at the given position in the given buffer, using the given ByteOrder
Parameters:
  buffer - buffer into which to insert the int
Parameters:
  val - Int to insert
Parameters:
  offset - offset at which to insert the int
Parameters:
  order - the order to insert the bytes of the int



putRange
public static void putRange(ByteBuffer buffer, int start, int end, byte b)(Code)
Sets all bytes in the given byte range to the given byte value.



toHexFile
public static void toHexFile(String fileName, ByteBuffer buffer, int offset, int size) throws IOException(Code)
Writes a chunk of data to a file in pretty printed hexidecimal.



toHexString
public static String toHexString(ByteBuffer buffer, int size)(Code)
Convert a byte buffer to a hexadecimal string for display
Parameters:
  buffer - Buffer to display, starting at offset 0
Parameters:
  size - Number of bytes to read from the buffer The display String



toHexString
public static String toHexString(byte[] array)(Code)
Convert a byte array to a hexadecimal string for display
Parameters:
  buffer - Buffer to display, starting at offset 0 The display String



toHexString
public static String toHexString(ByteBuffer buffer, int offset, int size)(Code)
Convert a byte buffer to a hexadecimal string for display
Parameters:
  buffer - Buffer to display, starting at offset 0
Parameters:
  offset - Offset at which to start reading the buffer
Parameters:
  size - Number of bytes to read from the buffer The display String



toHexString
public static String toHexString(ByteBuffer buffer, int offset, int size, boolean formatted)(Code)
Convert a byte buffer to a hexadecimal string for display
Parameters:
  buffer - Buffer to display, starting at offset 0
Parameters:
  offset - Offset at which to start reading the buffer
Parameters:
  size - Number of bytes to read from the buffer
Parameters:
  formatted - flag indicating if formatting is required The display String



writeHexString
public static void writeHexString(ByteBuffer buffer, String hexStr) throws IOException(Code)
Writes a sequence of hexidecimal values into the given buffer, where every two characters represent one byte value.



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.