Java Doc for Util.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hpsf » 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 » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hpsf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.hpsf.Util

Util
public class Util (Code)

Provides various static utility methods.


author:
   Rainer Klute (klute@rainer-klute.de)
version:
   $Id: Util.java 550886 2007-06-26 17:58:28Z klute $
since:
   2002-02-09


Field Summary
final public static  longEPOCH_DIFF
    

The difference between the Windows epoch (1601-01-01 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in milliseconds: 11644473600000L.



Method Summary
public static  byte[]cat(byte[][] byteArrays)
    

Concatenates the contents of several byte arrays into a single one.


Parameters:
  byteArrays - The byte arrays to be concatened.
public static  voidcopy(byte[] src, int srcOffset, int length, byte[] dst, int dstOffset)
    
public static  byte[]copy(byte[] src, int offset, int length)
    

Copies bytes from a source byte array into a new byte array.


Parameters:
  src - Copy from this byte array.
Parameters:
  offset - Start copying here.
Parameters:
  length - Copy this many bytes.
public static  longdateToFileTime(Date date)
    
public static  booleanequal(byte[] a, byte[] b)
    

Checks whether two byte arrays a and b are equal.

public static  booleanequals(Collection c1, Collection c2)
    

Checks whether two collections are equal.

public static  booleanequals(Object[] c1, Object[] c2)
    

Compares to object arrays with regarding the objects' order.

public static  DatefiletimeToDate(int high, int low)
    

Converts a Windows FILETIME into a Date .

public static  DatefiletimeToDate(long filetime)
    

Converts a Windows FILETIME into a Date .

public static  byte[]pad4(byte[] ba)
    

Pads a byte array with 0x00 bytes so that its length is a multiple of 4.


Parameters:
  ba - The byte array to pad.
public static  char[]pad4(char[] ca)
    

Pads a character array with 0x0000 characters so that its length is a multiple of 4.


Parameters:
  ca - The character array to pad.
public static  char[]pad4(String s)
    

Pads a string with 0x0000 characters so that its length is a multiple of 4.


Parameters:
  s - The string to pad.
public static  StringtoString(Throwable t)
    

Field Detail
EPOCH_DIFF
final public static long EPOCH_DIFF(Code)

The difference between the Windows epoch (1601-01-01 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in milliseconds: 11644473600000L. (Use your favorite spreadsheet program to verify the correctness of this value. By the way, did you notice that you can tell from the epochs which operating system is the modern one? :-))






Method Detail
cat
public static byte[] cat(byte[][] byteArrays)(Code)

Concatenates the contents of several byte arrays into a single one.


Parameters:
  byteArrays - The byte arrays to be concatened. A new byte array containing the concatenated bytearrays.



copy
public static void copy(byte[] src, int srcOffset, int length, byte[] dst, int dstOffset)(Code)

Copies a part of a byte array into another byte array.


Parameters:
  src - The source byte array.
Parameters:
  srcOffset - Offset in the source byte array.
Parameters:
  length - The number of bytes to copy.
Parameters:
  dst - The destination byte array.
Parameters:
  dstOffset - Offset in the destination byte array.



copy
public static byte[] copy(byte[] src, int offset, int length)(Code)

Copies bytes from a source byte array into a new byte array.


Parameters:
  src - Copy from this byte array.
Parameters:
  offset - Start copying here.
Parameters:
  length - Copy this many bytes. The new byte array. Its length is number of copied bytes.



dateToFileTime
public static long dateToFileTime(Date date)(Code)

Converts a Date into a filetime.


Parameters:
  date - The date to be converted The filetime
See Also:   Util.filetimeToDate(long)
See Also:   Util.filetimeToDate(int,int)



equal
public static boolean equal(byte[] a, byte[] b)(Code)

Checks whether two byte arrays a and b are equal. They are equal

  • if they have the same length and

  • if for each i with i >= 0 and i < a.length holds a[i] == b[i].


Parameters:
  a - The first byte array
Parameters:
  b - The first byte array true if the byte arrays are equal, elsefalse



equals
public static boolean equals(Collection c1, Collection c2)(Code)

Checks whether two collections are equal. Two collections C1 and C2 are equal, if the following conditions are true:

  • For each c1i (element of C1) there is a c2j (element of C2), and c1i equals c2j.

  • For each c2i (element of C2) there is a c1j (element of C1) and c2i equals c1j.


Parameters:
  c1 - the first collection
Parameters:
  c2 - the second collection true if the collections are equal, elsefalse.



equals
public static boolean equals(Object[] c1, Object[] c2)(Code)

Compares to object arrays with regarding the objects' order. For example, [1, 2, 3] and [2, 1, 3] are equal.


Parameters:
  c1 - The first object array.
Parameters:
  c2 - The second object array. true if the object arrays are equal,false if they are not.



filetimeToDate
public static Date filetimeToDate(int high, int low)(Code)

Converts a Windows FILETIME into a Date . The Windows FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601. This 64-bit value is split into the two double words stored in the structure.


Parameters:
  high - The higher double word of the FILETIME structure.
Parameters:
  low - The lower double word of the FILETIME structure. The Windows FILETIME as a Date.



filetimeToDate
public static Date filetimeToDate(long filetime)(Code)

Converts a Windows FILETIME into a Date . The Windows FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601.


Parameters:
  filetime - The filetime to convert. The Windows FILETIME as a Date.



pad4
public static byte[] pad4(byte[] ba)(Code)

Pads a byte array with 0x00 bytes so that its length is a multiple of 4.


Parameters:
  ba - The byte array to pad. The padded byte array.



pad4
public static char[] pad4(char[] ca)(Code)

Pads a character array with 0x0000 characters so that its length is a multiple of 4.


Parameters:
  ca - The character array to pad. The padded character array.



pad4
public static char[] pad4(String s)(Code)

Pads a string with 0x0000 characters so that its length is a multiple of 4.


Parameters:
  s - The string to pad. The padded string as a character array.



toString
public static String toString(Throwable t)(Code)

Returns a textual representation of a Throwable , including a stacktrace.


Parameters:
  t - The Throwable a string containing the output of a call tot.printStacktrace().



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.