File: XmlDecl.java

package info (click to toggle)
lib-xp-java 0.5-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,652 kB
  • ctags: 2,424
  • sloc: java: 8,085; makefile: 53; sh: 17; xml: 7
file content (32 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.jclark.xml.tok;

/**
 * An XML declaration.
 * @version $Revision: 1.3 $ $Date: 1998/02/17 04:24:35 $
 */
public class XmlDecl extends TextDecl {
  private boolean standalone;

  /**
   * Returns true if the XML declaration specified
   * <code>standalone="yes"</code>.
   */
  public boolean isStandalone() {
    return standalone;
  }
  
  /**
   * Creates an <code>XMLDecl</code> from the specified byte subarray.
   * The specified encoding is used to convert bytes to characters.
   * The byte subarray should be a <code>TOK_XML_DECL</code> token
   * returned from Encoding.tokenizeProlog or Encoding.tokenizeContent,
   * starting with <code>&lt;?</code> and ending with <code>?&gt;</code>.
   * @exception InvalidTokenException if the specified byte subarray
   * is not a legal XML declaration.
   */
  public XmlDecl(Encoding enc, byte[] buf, int off, int end)
       throws InvalidTokenException {
    standalone = init(true, enc, buf, off, end);
  }
      
}