Framework Professional Edition Package


com.prosyst.util.jar
Class Manifest

java.lang.Object
  extended by java.util.Dictionary
      extended by java.util.Hashtable
          extended by com.prosyst.util.jar.Manifest
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map
Direct Known Subclasses:
JarManifest

public class Manifest
extends java.util.Hashtable

Per every bundle there is such a Manifest object, representing it .

Author:
Teodor Todorov, Svetozar Dimov
See Also:
Serialized Form

Field Summary
protected  CertificateManager cd
           
static java.lang.String FMAN
           
protected  CharBuffer gbuff
          This buffer is used for accumulation off attribute value.
protected static java.lang.String[] keys
           
protected  boolean localized
           
static java.lang.String MAN
          manifest file name
protected  java.lang.String name
          all attribute names
static java.lang.String STORAGE_MAN
          storage manifest file name
protected static XString[] xstrings
           
 
Constructor Summary
Manifest(int size)
           
 
Method Summary
protected  void addPair(java.lang.String key, java.lang.String value, XString[] xstrings)
           
protected  XString createKey(java.lang.String s)
           
protected  boolean emptyLine()
           
protected  boolean emptyLine0()
           
 java.lang.Object get(java.lang.Object key)
           
 Attributes getAttributes(java.lang.String name)
           
 java.util.Vector getEntries()
           
 JarEntry getJarEntry(java.util.zip.ZipEntry zentry)
           
protected  java.lang.String[] getKeys()
           
protected  XString[] getXStrings()
           
 java.util.Enumeration keys()
           
static void main(java.lang.String[] _)
           
protected  XString makeKey(java.lang.String s, int id, XString[] xstrings)
           
 void parseFile(java.io.InputStream is, int size)
           
 void parseStream(java.io.InputStream is, int size)
           
 void parseStream(java.io.InputStream is, int size, java.io.OutputStream os, java.io.File file)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object val)
           
static void setUseSecurity()
           
 java.lang.String toString()
           
protected  void writeFile(byte[] buff, java.io.OutputStream os, java.io.File file)
           
protected  int writeKey(byte key, byte[] buff, java.io.OutputStream os, int count)
           
protected  int writeKey(XString key, byte[] buff, java.io.OutputStream os, int count)
           
protected  int writeValue(java.lang.String value, byte[] buff, java.io.OutputStream os, int count)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keySet, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAN

public static final java.lang.String MAN
manifest file name

See Also:
Constant Field Values

FMAN

public static final java.lang.String FMAN

STORAGE_MAN

public static final java.lang.String STORAGE_MAN
storage manifest file name

See Also:
Constant Field Values

xstrings

protected static XString[] xstrings

keys

protected static java.lang.String[] keys

name

protected java.lang.String name
all attribute names


gbuff

protected CharBuffer gbuff
This buffer is used for accumulation off attribute value. In specification value of one attribute can be on serveral lines. Every new line must start with SPACE.


localized

protected boolean localized

cd

protected CertificateManager cd
Constructor Detail

Manifest

public Manifest(int size)
Method Detail

setUseSecurity

public static void setUseSecurity()

parseStream

public void parseStream(java.io.InputStream is,
                        int size)
                 throws java.io.IOException
Throws:
java.io.IOException

parseStream

public void parseStream(java.io.InputStream is,
                        int size,
                        java.io.OutputStream os,
                        java.io.File file)
                 throws java.io.IOException
Throws:
java.io.IOException

writeFile

protected void writeFile(byte[] buff,
                         java.io.OutputStream os,
                         java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException

writeKey

protected int writeKey(XString key,
                       byte[] buff,
                       java.io.OutputStream os,
                       int count)
                throws java.io.IOException
Throws:
java.io.IOException

writeKey

protected int writeKey(byte key,
                       byte[] buff,
                       java.io.OutputStream os,
                       int count)
                throws java.io.IOException
Throws:
java.io.IOException

writeValue

protected int writeValue(java.lang.String value,
                         byte[] buff,
                         java.io.OutputStream os,
                         int count)
                  throws java.io.IOException
Throws:
java.io.IOException

getXStrings

protected XString[] getXStrings()

makeKey

protected XString makeKey(java.lang.String s,
                          int id,
                          XString[] xstrings)

getKeys

protected java.lang.String[] getKeys()

parseFile

public void parseFile(java.io.InputStream is,
                      int size)
               throws java.io.IOException
Throws:
java.io.IOException

addPair

protected void addPair(java.lang.String key,
                       java.lang.String value,
                       XString[] xstrings)

getEntries

public java.util.Vector getEntries()

getAttributes

public Attributes getAttributes(java.lang.String name)

getJarEntry

public JarEntry getJarEntry(java.util.zip.ZipEntry zentry)

createKey

protected XString createKey(java.lang.String s)

keys

public java.util.Enumeration keys()
Overrides:
keys in class java.util.Hashtable

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object val)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.Hashtable

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.Hashtable

emptyLine

protected boolean emptyLine()

emptyLine0

protected boolean emptyLine0()
Returns:
true if there a double new line was found (indicating the end of the manifest), false if this was a single nl (indicating the end of the main attributes, or an entry's attribute section)

main

public static void main(java.lang.String[] _)
                 throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.util.Hashtable

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved