    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class com.jclark.xml.tok.TextDecl

    java.lang.Object
       |
       +----com.jclark.xml.tok.TextDecl

public class TextDecl
extends Object

An XML TextDecl.

##

TextDecl(Encoding, byte[], int, int)
  Creates a `TextDecl` from the specified byte subarray.

##

getEncoding()
  Return the encoding specified in the declaration, or null if no encoding was specified.
getVersion()
  Return the version specified in the declaration, or null if no version was specified.

##

TextDecl

     public TextDecl(Encoding enc,
                     byte buf[],
                     int off,
                     int end) throws InvalidTokenException

  Creates a `TextDecl` from the specified byte subarray. The specified encoding is used to convert bytes to characters. The byte subarray should be a `TOK_XML_DECL` token returned from Encoding.tokenizeProlog or Encoding.tokenizeContent, starting with `<?` and ending with `?>`.

  Throws: InvalidTokenException
    if the specified byte subarray is not a legal XML TextDecl.

##

getEncoding

     public String getEncoding()

  Return the encoding specified in the declaration, or null if no encoding was specified.

getVersion

     public String getVersion()

  Return the version specified in the declaration, or null if no version was specified.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index