Java Doc for Section.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.Section

All known Subclasses:   org.apache.poi.hpsf.MutableSection,
Section
public class Section (Code)

Represents a section in a PropertySet .


author:
   Rainer Klute author:
   href="mailto:klute@rainer-klute.de"><klute@rainer-klute.de>
author:
   Drew Varner (Drew.Varner allUpIn sc.edu)
version:
   $Id: Section.java 550021 2007-06-23 07:44:47Z klute $
since:
   2002-02-09

Inner Class :class PropertyListEntry implements Comparable

Field Summary
protected  Mapdictionary
    

Maps property IDs to section-private PID strings.

protected  ClassIDformatID
    
protected  longoffset
    
protected  Property[]properties
    
protected  intsize
    

Constructor Summary
protected  Section()
    

Creates an empty and uninitialized Section .

public  Section(byte[] src, int offset)
    

Method Summary
public  booleanequals(Object o)
    

Checks whether this section is equal to another object.

public  intgetCodepage()
    
public  MapgetDictionary()
    

Gets the section's dictionary.

public  ClassIDgetFormatID()
    

Returns the format ID.

public  longgetOffset()
    
public  StringgetPIDString(long pid)
    

Returns the PID string associated with a property ID.

public  Property[]getProperties()
    
public  ObjectgetProperty(long id)
    

Returns the value of the property with the specified ID.

protected  booleangetPropertyBooleanValue(int id)
    

Returns the value of the boolean property with the specified ID.

public  intgetPropertyCount()
    
protected  intgetPropertyIntValue(long id)
    

Returns the value of the numeric property with the specified ID.

public  intgetSize()
    
public  inthashCode()
    
public  StringtoString()
    
public  booleanwasNull()
    

Checks whether the property which the last call to Section.getPropertyIntValue or Section.getProperty tried to access was available or not.


Field Detail
dictionary
protected Map dictionary(Code)

Maps property IDs to section-private PID strings. These strings can be found in the property with ID 0.




formatID
protected ClassID formatID(Code)

The section's format ID, Section.getFormatID .




offset
protected long offset(Code)

See Also:   Section.getOffset



properties
protected Property[] properties(Code)

See Also:   Section.getProperties



size
protected int size(Code)

See Also:   Section.getSize




Constructor Detail
Section
protected Section()(Code)

Creates an empty and uninitialized Section .




Section
public Section(byte[] src, int offset) throws UnsupportedEncodingException(Code)

Creates a Section instance from a byte array.


Parameters:
  src - Contains the complete property set stream.
Parameters:
  offset - The position in the stream that points to thesection's format ID.
exception:
  UnsupportedEncodingException - if the section's codepage is notsupported.




Method Detail
equals
public boolean equals(Object o)(Code)

Checks whether this section is equal to another object. The result is false if one of the the following conditions holds:

  • The other object is not a Section .

  • The format IDs of the two sections are not equal.

  • The sections have a different number of properties. However, properties with ID 1 (codepage) are not counted.

  • The other object is not a Section .

  • The properties have different values. The order of the properties is irrelevant.


Parameters:
  o - The object to compare this section with true if the objects are equal, false ifnot



getCodepage
public int getCodepage()(Code)

Gets the section's codepage, if any.

The section's codepage if one is defined, else -1.



getDictionary
public Map getDictionary()(Code)

Gets the section's dictionary. A dictionary allows an application to use human-readable property names instead of numeric property IDs. It contains mappings from property IDs to their associated string values. The dictionary is stored as the property with ID 0. The codepage for the strings in the dictionary is defined by property with ID 1.

the dictionary or null if the section does not havea dictionary.



getFormatID
public ClassID getFormatID()(Code)

Returns the format ID. The format ID is the "type" of the section. For example, if the format ID of the first Section contains the bytes specified by org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID the section (and thus the property set) is a SummaryInformation.

The format ID



getOffset
public long getOffset()(Code)

Returns the offset of the section in the stream.

The offset of the section in the stream.



getPIDString
public String getPIDString(long pid)(Code)

Returns the PID string associated with a property ID. The ID is first looked up in the Section 's private dictionary. If it is not found there, the method calls SectionIDMap.getPIDString .


Parameters:
  pid - The property ID The property ID's string value



getProperties
public Property[] getProperties()(Code)

Returns this section's properties.

This section's properties.



getProperty
public Object getProperty(long id)(Code)

Returns the value of the property with the specified ID. If the property is not available, null is returned and a subsequent call to Section.wasNull will return true.


Parameters:
  id - The property's ID The property's value



getPropertyBooleanValue
protected boolean getPropertyBooleanValue(int id)(Code)

Returns the value of the boolean property with the specified ID. If the property is not available, false is returned. A subsequent call to Section.wasNull will return true to let the caller distinguish that case from a real property value of false.


Parameters:
  id - The property's ID The property's value



getPropertyCount
public int getPropertyCount()(Code)

Returns the number of properties in this section.

The number of properties in this section.



getPropertyIntValue
protected int getPropertyIntValue(long id)(Code)

Returns the value of the numeric property with the specified ID. If the property is not available, 0 is returned. A subsequent call to Section.wasNull will return true to let the caller distinguish that case from a real property value of 0.


Parameters:
  id - The property's ID The property's value



getSize
public int getSize()(Code)

Returns the section's size in bytes.

The section's size in bytes.



hashCode
public int hashCode()(Code)

See Also:   Object.hashCode



toString
public String toString()(Code)

See Also:   Object.toString



wasNull
public boolean wasNull()(Code)

Checks whether the property which the last call to Section.getPropertyIntValue or Section.getProperty tried to access was available or not. This information might be important for callers of Section.getPropertyIntValue since the latter returns 0 if the property does not exist. Using Section.wasNull the caller can distiguish this case from a property's real value of 0.

true if the last call to Section.getPropertyIntValue or Section.getProperty tried to access aproperty that was not available, else false.



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.