Java Doc for MutableSection.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
      org.apache.poi.hpsf.MutableSection

MutableSection
public class MutableSection extends Section (Code)

Adds writing capability to the Section class.

Please be aware that this class' functionality will be merged into the Section class at a later time, so the API will change.


version:
   $Id: MutableSection.java 489730 2006-12-22 19:18:16Z bayard $
since:
   2002-02-20



Constructor Summary
public  MutableSection()
    
public  MutableSection(Section s)
    

Constructs a MutableSection by doing a deep copy of an existing Section.


Method Summary
public  voidclear()
    
public  Property[]getProperties()
    
public  ObjectgetProperty(long id)
    
public  intgetPropertyCount()
    
public  intgetSize()
    
public  voidremoveProperty(long id)
    
public  voidsetCodepage(int codepage)
    
public  voidsetDictionary(Map dictionary)
    

Sets the section's dictionary.

public  voidsetFormatID(ClassID formatID)
    
public  voidsetFormatID(byte[] formatID)
    

Sets the section's format ID.


Parameters:
  formatID - The section's format ID as a byte array.
public  voidsetProperties(Property[] properties)
    

Sets this section's properties.

public  voidsetProperty(int id, String value)
    

Sets the string value of the property with the specified ID.


Parameters:
  id - The property's ID
Parameters:
  value - The property's value.
public  voidsetProperty(int id, int value)
    
public  voidsetProperty(int id, long value)
    
public  voidsetProperty(int id, boolean value)
    
public  voidsetProperty(int id, long variantType, Object value)
    

Sets the value and the variant type of the property with the specified ID.

public  voidsetProperty(Property p)
    
public  voidsetProperty(int id, Object value)
    

Sets a property.


Parameters:
  id - The property ID.
Parameters:
  value - The property's value.
protected  voidsetPropertyBooleanValue(int id, boolean value)
    
public  intwrite(OutputStream out)
    

Writes this section into an output stream.

Internally this is done by writing into three byte array output streams: one for the properties, one for the property list and one for the section as such.



Constructor Detail
MutableSection
public MutableSection()(Code)

Creates an empty mutable section.




MutableSection
public MutableSection(Section s)(Code)

Constructs a MutableSection by doing a deep copy of an existing Section. All nested Property instances, will be their mutable counterparts in the new MutableSection.


Parameters:
  s - The section set to copy




Method Detail
clear
public void clear()(Code)

Removes all properties from the section including 0 (dictionary) and 1 (codepage).




getProperties
public Property[] getProperties()(Code)

Gets this section's properties.

this section's properties.



getProperty
public Object getProperty(long id)(Code)

Gets a property.


Parameters:
  id - The ID of the property to get The property or null if there is no such property



getPropertyCount
public int getPropertyCount()(Code)

Overwrites the super class' method to cope with a redundancy: the property count is maintained in a separate member variable, but shouldn't.

The number of properties in this section



getSize
public int getSize()(Code)

Returns the section's size.

the section's size.



removeProperty
public void removeProperty(long id)(Code)

Removes a property.


Parameters:
  id - The ID of the property to be removed



setCodepage
public void setCodepage(int codepage)(Code)

Sets the codepage.


Parameters:
  codepage - the codepage



setDictionary
public void setDictionary(Map dictionary) throws IllegalPropertySetDataException(Code)

Sets the section's dictionary. All keys in the dictionary must be java.lang.Long instances, all values must be java.lang.String s. This method overwrites the properties with IDs 0 and 1 since they are reserved for the dictionary and the dictionary's codepage. Setting these properties explicitly might have surprising effects. An application should never do this but always use this method.


Parameters:
  dictionary - The dictionary
exception:
  IllegalPropertySetDataException - if the dictionary's key andvalue types are not correct.
See Also:   Section.getDictionary



setFormatID
public void setFormatID(ClassID formatID)(Code)

Sets the section's format ID.


Parameters:
  formatID - The section's format ID
See Also:   MutableSection.setFormatID(byte[])
See Also:   Section.getFormatID



setFormatID
public void setFormatID(byte[] formatID)(Code)

Sets the section's format ID.


Parameters:
  formatID - The section's format ID as a byte array. It componentsare in big-endian format.
See Also:   MutableSection.setFormatID(ClassID)
See Also:   Section.getFormatID



setProperties
public void setProperties(Property[] properties)(Code)

Sets this section's properties. Any former values are overwritten.


Parameters:
  properties - This section's new properties.



setProperty
public void setProperty(int id, String value)(Code)

Sets the string value of the property with the specified ID.


Parameters:
  id - The property's ID
Parameters:
  value - The property's value. It will be written as a Unicodestring.
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty



setProperty
public void setProperty(int id, int value)(Code)

Sets the int value of the property with the specified ID.


Parameters:
  id - The property's ID
Parameters:
  value - The property's value.
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty



setProperty
public void setProperty(int id, long value)(Code)

Sets the long value of the property with the specified ID.


Parameters:
  id - The property's ID
Parameters:
  value - The property's value.
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty



setProperty
public void setProperty(int id, boolean value)(Code)

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


Parameters:
  id - The property's ID
Parameters:
  value - The property's value.
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty



setProperty
public void setProperty(int id, long variantType, Object value)(Code)

Sets the value and the variant type of the property with the specified ID. If a property with this ID is not yet present in the section, it will be added. An already present property with the specified ID will be overwritten. A default mapping will be used to choose the property's type.


Parameters:
  id - The property's ID.
Parameters:
  variantType - The property's variant type.
Parameters:
  value - The property's value.
See Also:   MutableSection.setProperty(int,String)
See Also:   MutableSection.getProperty
See Also:   Variant



setProperty
public void setProperty(Property p)(Code)

Sets a property.


Parameters:
  p - The property to be set.
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty
See Also:   Variant



setProperty
public void setProperty(int id, Object value)(Code)

Sets a property.


Parameters:
  id - The property ID.
Parameters:
  value - The property's value. The value's class must be one of thosesupported by HPSF.



setPropertyBooleanValue
protected void setPropertyBooleanValue(int id, boolean value)(Code)

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


Parameters:
  id - The property's ID
Parameters:
  value - The property's value
See Also:   MutableSection.setProperty(int,long,Object)
See Also:   MutableSection.getProperty
See Also:   Variant



write
public int write(OutputStream out) throws WritingNotSupportedException, IOException(Code)

Writes this section into an output stream.

Internally this is done by writing into three byte array output streams: one for the properties, one for the property list and one for the section as such. The two former are appended to the latter when they have received all their data.


Parameters:
  out - The stream to write into. The number of bytes written, i.e. the section's size.
exception:
  IOException - if an I/O error occurs
exception:
  WritingNotSupportedException - if HPSF does not yet supportwriting a property's variant type.



Fields inherited from org.apache.poi.hpsf.Section
protected Map dictionary(Code)(Java Doc)
protected ClassID formatID(Code)(Java Doc)
protected long offset(Code)(Java Doc)
protected Property[] properties(Code)(Java Doc)
protected int size(Code)(Java Doc)

Methods inherited from org.apache.poi.hpsf.Section
public boolean equals(Object o)(Code)(Java Doc)
public int getCodepage()(Code)(Java Doc)
public Map getDictionary()(Code)(Java Doc)
public ClassID getFormatID()(Code)(Java Doc)
public long getOffset()(Code)(Java Doc)
public String getPIDString(long pid)(Code)(Java Doc)
public Property[] getProperties()(Code)(Java Doc)
public Object getProperty(long id)(Code)(Java Doc)
protected boolean getPropertyBooleanValue(int id)(Code)(Java Doc)
public int getPropertyCount()(Code)(Java Doc)
protected int getPropertyIntValue(long id)(Code)(Java Doc)
public int getSize()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean wasNull()(Code)(Java Doc)

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.