Java Doc for ManifestProperties.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » installer » 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 » 6.0 JDK Modules » j2me » com.sun.midp.installer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Hashtable
      java.util.Properties
         com.sun.midp.installer.JadProperties
            com.sun.midp.installer.ManifestProperties

ManifestProperties
public class ManifestProperties extends JadProperties (Code)
Handles the properties in a JAR manifest. Each property is know as a header in the syntax definition. A line that begins with a space is a continuation of the previous line, and the first space ignored. To save code this manifest parser uses lets its super class parse the key and value of property once it has read the entire line, including continuation lines. This means that this parser is lax on reporting illegal characters.

The BNF for the manifest syntax included below is extended as follows:

 ":":separates the name and value of a rule
 +: 1 or more
 : 0 or more
 {}: encloses a list of alternatives
 ;: comment
 terminals can also be represented in UPPER CASE
 non-terminals are not encluded in angle brackets
 

Syntax definition from the manifest spec:

In most cases, information contained within the manifest file or signature files is represented as so-called "name: value" pairs inspired by the RFC822 standard.

Groups of name-value pairs are known as a "section". Sections are separated from other sections by empty lines.

Binary data of any form is represented as base64. Continuations are required for binary data which causes line length to exceed 72 bytes. Examples of binary data are digests and signatures.

Implementations shall support header values of up to 65535 bytes.

 section: *header +newline
 nonempty-section: +header +newline
 newline: CR LF | LF | CR (not followed by LF)
 ; That 'not followed by LF' probably requires some minor
 ; ugliness in the parser. Sorry.
 header: alphanum *headerchar ":" SPACE *otherchar newline
 continuation
 continuation: SPACE *otherchar newline
 ; RFC822 has +(SPACE | TAB), but this way continuation lines 
 ; never get mangled.
 alphanum: {"A"-"Z"} | {"a"-"z"} | {"0"-"9"}
 headerchar: alphanum | "-" | "_"
 otherchar: any Unicode character except NUL, CR and LF
 ; Also: To prevent mangling of files sent via straight e-mail, no 
 ; header will start with the four letters "From".
 ; When version numbering is used:
 number: {"0"-"9"}+
 ; The number needn't be, e.g. 1.11 is considered to be later
 ; than 1.9. Both major and minor versions must be 3 digits or less.
 


Field Summary
final protected static  intNO_REMAINDER
     Signals that there is no remainder.
protected  intremainder
     Holds the remainder from the last look ahead operation.

Constructor Summary
public  ManifestProperties()
     Constructor - creates an empty property list.

Method Summary
protected  booleancheckKeyChars(String key)
     Check to see if all the chars in the key of a property are valid.
protected  booleancheckValueChars(String value)
     Check to see if all the chars in the value of a property are valid.
public  voidpartialLoad(InputStream inStream, String enc, int propertiesToLoad)
     Read a portion of the manifest.
protected  StringreadLine(Reader in)
     Reads one line using a given reader.

Field Detail
NO_REMAINDER
final protected static int NO_REMAINDER(Code)
Signals that there is no remainder.



remainder
protected int remainder(Code)
Holds the remainder from the last look ahead operation.




Constructor Detail
ManifestProperties
public ManifestProperties()(Code)
Constructor - creates an empty property list.




Method Detail
checkKeyChars
protected boolean checkKeyChars(String key)(Code)
Check to see if all the chars in the key of a property are valid.
Parameters:
  key - key to check false if a character is not valid for a key



checkValueChars
protected boolean checkValueChars(String value)(Code)
Check to see if all the chars in the value of a property are valid.
Parameters:
  value - value to check false if a character is not valid for a value



partialLoad
public void partialLoad(InputStream inStream, String enc, int propertiesToLoad) throws IOException, InvalidJadException(Code)
Read a portion of the manifest.
Parameters:
  inStream - the current data source for the manifest
Parameters:
  enc - the character set encoding of the manifest
Parameters:
  propertiesToLoad - the names of the properties to load
exception:
  IOException - is thrown if an error occurs reading the manifest data stream.
exception:
  InvalidJadException - if the JAD is not formatted correctly.



readLine
protected String readLine(Reader in) throws IOException(Code)
Reads one line using a given reader. CR, LF, or CR + LF end a line. However lines may be continued by beginning the next line with a space. The end of line and end of file characters and continuation space are dropped.
Parameters:
  in - reader for a JAD one line of the JAD or null at the end of the JAD
exception:
  IOException - thrown by the reader



Fields inherited from com.sun.midp.installer.JadProperties
final protected static int CR(Code)(Java Doc)
final protected static int EOF(Code)(Java Doc)
final protected static int HT(Code)(Java Doc)
final protected static int LF(Code)(Java Doc)
final protected static int SP(Code)(Java Doc)
protected char[] lineBuffer(Code)(Java Doc)

Methods inherited from com.sun.midp.installer.JadProperties
protected boolean checkKeyChars(String key)(Code)(Java Doc)
protected boolean checkValueChars(String value)(Code)(Java Doc)
public synchronized void load(InputStream inStream, String enc) throws IOException, InvalidJadException(Code)(Java Doc)
public synchronized void load(InputStream inStream) throws IOException, InvalidJadException(Code)(Java Doc)
public void partialLoad(InputStream inStream, String enc, int propertiesToLoad) throws IOException, InvalidJadException(Code)(Java Doc)
protected void putProperty(String key, String value)(Code)(Java Doc)
protected String readLine(Reader in) throws IOException(Code)(Java Doc)

Fields inherited from java.util.Properties
protected Properties defaults(Code)(Java Doc)

Methods inherited from java.util.Properties
public String getProperty(String key)(Code)(Java Doc)
public String getProperty(String key, String defaultValue)(Code)(Java Doc)
public void list(PrintStream out)(Code)(Java Doc)
public void list(PrintWriter out)(Code)(Java Doc)
public synchronized void load(InputStream inStream) throws IOException(Code)(Java Doc)
public Enumeration propertyNames()(Code)(Java Doc)
public synchronized void save(OutputStream out, String header)(Code)(Java Doc)
public synchronized Object setProperty(String key, String value)(Code)(Java Doc)
public synchronized void store(OutputStream out, String header) throws IOException(Code)(Java Doc)

Methods inherited from java.util.Hashtable
public synchronized void clear()(Code)(Java Doc)
public synchronized boolean contains(Object value)(Code)(Java Doc)
public synchronized boolean containsKey(Object key)(Code)(Java Doc)
public synchronized Enumeration elements()(Code)(Java Doc)
public synchronized Object get(Object key)(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public synchronized Enumeration keys()(Code)(Java Doc)
public synchronized Object put(Object key, Object value)(Code)(Java Doc)
protected void rehash()(Code)(Java Doc)
public synchronized Object remove(Object key)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public synchronized String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.