home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.xml.internal;
-
- import com.ibm.xml.framework.ChunkyByteArray;
- import com.ibm.xml.framework.ChunkyCharArray;
- import com.ibm.xml.framework.ParserState;
- import com.ibm.xml.framework.ScanContentState;
- import com.ibm.xml.framework.XMLReader;
- import java.io.IOException;
-
- final class XMLDeclReader extends XMLReader {
- private ChunkyByteArray fData;
- private ParserState fParserState;
-
- XMLDeclReader(ChunkyByteArray var1, ParserState var2) {
- super((ParserState)null, (String)null, (String)null);
- this.fData = var1;
- this.fParserState = var2;
- }
-
- public boolean skippedChar(char var1) throws IOException {
- if (this.fData.byteAt(super.fCurrentOffset) != var1) {
- return false;
- } else {
- ++super.fCurrentOffset;
- return true;
- }
- }
-
- public boolean lookingAtChar(char var1) throws IOException {
- return this.fData.byteAt(super.fCurrentOffset) == var1;
- }
-
- public boolean skippedSpace() throws IOException {
- int var1 = this.fData.byteAt(super.fCurrentOffset) & 255;
- if (var1 != 32 && var1 != 9 && var1 != 10 && var1 != 13) {
- return false;
- } else {
- ++super.fCurrentOffset;
- return true;
- }
- }
-
- public int skipPastSpaces() throws IOException {
- while(true) {
- int var1 = this.fData.byteAt(super.fCurrentOffset) & 255;
- if (var1 != 32 && var1 != 9 && var1 != 10 && var1 != 13) {
- return super.fCurrentOffset;
- }
-
- ++super.fCurrentOffset;
- }
- }
-
- public boolean skippedAlpha() throws IOException {
- int var1 = this.fData.byteAt(super.fCurrentOffset) & 255;
- if (var1 <= 122 && XMLReader.fgAsciiAlphaChar[var1] != 0) {
- ++super.fCurrentOffset;
- return true;
- } else {
- return false;
- }
- }
-
- private boolean skippedAsciiCharWithFlag(byte var1) throws IOException {
- int var2 = this.fData.byteAt(super.fCurrentOffset) & 255;
- if ((var2 & 128) == 0 && (XMLReader.fgCharFlags[var2] & var1) != 0) {
- ++super.fCurrentOffset;
- return true;
- } else {
- return false;
- }
- }
-
- public boolean skippedVersionNum() throws IOException {
- return this.skippedAsciiCharWithFlag((byte)1);
- }
-
- public boolean skippedEncName() throws IOException {
- return this.skippedAsciiCharWithFlag((byte)2);
- }
-
- public boolean skippedString(char[] var1) throws IOException {
- int var2 = super.fCurrentOffset;
-
- for(int var3 = 0; var3 < var1.length; ++var3) {
- if (this.fData.byteAt(var2) != var1[var3]) {
- return false;
- }
-
- ++var2;
- }
-
- super.fCurrentOffset = var2;
- return true;
- }
-
- public int addString(int var1, int var2) {
- StringBuffer var3 = new StringBuffer();
-
- for(int var4 = 0; var4 < var2; ++var4) {
- var3.append((char)this.fData.byteAt(var1 + var4));
- }
-
- return this.fParserState.getStringPool().addString(var3.toString());
- }
-
- public int addSymbol(int var1, int var2) {
- return -1;
- }
-
- public void append(ChunkyCharArray var1, int var2, int var3) {
- }
-
- public int skipOneChar() throws IOException {
- throw new IOException();
- }
-
- public int skipAsciiChar() throws IOException {
- throw new IOException();
- }
-
- public int skipToChar(char var1) throws IOException {
- throw new IOException();
- }
-
- public int skipPastChar(char var1) throws IOException {
- throw new IOException();
- }
-
- public boolean skippedValidChar() throws IOException {
- throw new IOException();
- }
-
- public boolean lookingAtValidChar() throws IOException {
- throw new IOException();
- }
-
- public int skipInvalidChar(int var1) throws Exception {
- throw new IOException();
- }
-
- public boolean lookingAtSpace() throws IOException {
- throw new IOException();
- }
-
- public int skipDecimalDigit() throws IOException {
- throw new IOException();
- }
-
- public int skipHexDigit() throws IOException {
- throw new IOException();
- }
-
- public boolean skippedPubidChar() throws IOException {
- throw new IOException();
- }
-
- public int scanName(char var1, int var2) throws IOException {
- throw new IOException();
- }
-
- public int skipPastName(char var1) throws IOException {
- throw new IOException();
- }
-
- public int skipPastNmtoken(char var1) throws IOException {
- throw new IOException();
- }
-
- public int scanContent(ScanContentState var1) throws Exception {
- throw new IOException();
- }
- }
-