rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
readDataChunk ();
{ readDataChunk(); }
private void readDataChunk () throws SAXException, IOException { int count; // See if we have any overflow (filterCR sets for CR at end) if (readBufferOverflow > -1) { readBuffer [0] = (char) readBufferOverflow; readBufferOverflow = -1; readBufferPos = 1; sawCR = true; } else { readBufferP...
}
private void readDataChunk () throws SAXException, IOException { int count; // See if we have any overflow (filterCR sets for CR at end) if (readBufferOverflow > -1) { readBuffer [0] = (char) readBufferOverflow; readBufferOverflow = -1; readBufferPos = 1; sawCR = true; } else { readBufferP...
private String[] readExternalIds (boolean inNotation, boolean isSubset)
private ExternalIdentifiers readExternalIds(boolean inNotation, boolean isSubset)
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
String ids[] = new String [3];
ExternalIdentifiers ids = new ExternalIdentifiers();
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags); if (inNotation) { skipWhitespace (); c = readCh (); unread (c); if (c == '"' || c == '\'') { ids [1] = readLiteral (flags);
if (tryRead("PUBLIC")) { requireWhitespace(); ids.publicId = readLiteral(LIT_NORMALIZE | LIT_PUBID | flags); if (inNotation) { skipWhitespace(); c = readCh(); unread(c); if (c == '"' || c == '\'') { ids.systemId = readLiteral(flags);
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
} else { requireWhitespace (); ids [1] = readLiteral (flags);
} else { requireWhitespace(); ids.systemId = readLiteral(flags);
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
for (int i = 0; i < ids [0].length (); i++) { c = ids [0].charAt (i);
for (int i = 0; i < ids.publicId.length(); i++) { c = ids.publicId.charAt(i);
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
if (" \r\n0123456789-' ()+,./:=?;!*#@$_%".indexOf (c) != -1)
} if (" \r\n0123456789-' ()+,./:=?;!*#@$_%".indexOf(c) != -1) {
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
error ("illegal PUBLIC id character U+" + Integer.toHexString (c));
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
} else if (tryRead ("SYSTEM")) { requireWhitespace (); ids [1] = readLiteral (flags); } else if (!isSubset) error ("missing SYSTEM or PUBLIC keyword"); if (ids [1] != null) { if (ids [1].indexOf ('#') != -1) handler.verror ("SYSTEM id has a URI fragment: " + ids [1]); ids [2] = handler.getSystemId (); if (ids [2] == n...
error("illegal PUBLIC id character U+" + Integer.toHexString(c)); } } else if (tryRead("SYSTEM")) { requireWhitespace(); ids.systemId = readLiteral(flags); } else if (!isSubset) { error("missing SYSTEM or PUBLIC keyword");
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
return ids;
if (ids.systemId != null) { if (ids.systemId.indexOf('#') != -1) { handler.verror("SYSTEM id has a URI fragment: " + ids.systemId); } ids.baseUri = handler.getSystemId(); if (ids.baseUri == null && uriWarnings) { handler.warn("No base URI; hope URI is absolute: " + ids.systemId); }
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
return ids; }
private String[] readExternalIds (boolean inNotation, boolean isSubset) throws Exception { char c; String ids[] = new String [3]; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead ("PUBLIC")) { requireWhitespace (); ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);...
char ourBuf [] = readBuffer;
char[] ourBuf = readBuffer;
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
if ((flags & LIT_ENTITY_REF) > 0) { parseEntityRef (false); if (String.valueOf (readBuffer).equals("&#38;"))
if ((flags & LIT_ENTITY_REF) > 0) { parseEntityRef(false); if (String.valueOf(readBuffer).equals("&#38;")) {
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
} else { String name = readNmtoken (true); require (';'); dataBufferAppend ('&'); dataBufferAppend (name); dataBufferAppend (';');
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
c = readCh ();
} c = readCh();
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
error ("attribute values may not contain '<'");
{ error("attribute values may not contain '<'"); }
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
dataBufferAppend (c); c = readCh ();
dataBufferAppend(c); c = readCh(); }
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
} catch (EOFException e) { error ("end of input while looking for delimiter (started on line " + startLine + ')', null, new Character (delim).toString ());
catch (EOFException e) { error("end of input while looking for delimiter (started on line " + startLine + ')', null, new Character(delim).toString());
private String readLiteral (int flags) throws SAXException, IOException { char delim, c; int startLine = line; boolean saved = expandPE; boolean savedReport = doReport; // Find the first delimiter. delim = readCh (); if (delim != '"' && delim != '\'') { error ("expected '\"' or \"'\"", delim, null); r...
error ("name expected", readBuffer [i], null);
{ error("name expected", readBuffer[i], null); }
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
error ("Not a name start character, U+" + Integer.toHexString (c));
{ error("Not a name start character, U+" + Integer.toHexString(c)); }
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
error ("Not a name start character, U+" + Integer.toHexString (c)); } else if (!Character.isUnicodeIdentifierPart (c)
{ error("Not a name start character, U+" + Integer.toHexString(c)); } } else if (!Character.isUnicodeIdentifierPart(c)
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
&& !isExtender (c)) error ("Not a name character, U+" + Integer.toHexString (c));
&& !isExtender(c)) { error("Not a name character, U+" + Integer.toHexString(c)); }
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
&& !Character.isUnicodeIdentifierStart ( nameBuffer [0]) && ":_".indexOf (nameBuffer [0]) == -1) error ("Not a name start character, U+" + Integer.toHexString (nameBuffer [0])); String s = intern (nameBuffer, 0, nameBufferPos);
&& !Character.isUnicodeIdentifierStart(nameBuffer[0]) && ":_".indexOf(nameBuffer[0]) == -1) { error("Not a name start character, U+" + Integer.toHexString(nameBuffer[0])); } String s = intern(nameBuffer, 0, nameBufferPos);
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
&& !Character.isUnicodeIdentifierPart (c) && ":-_.".indexOf (c) == -1 && !isExtender (c)) error ("Not a name character, U+" + Integer.toHexString (c));
&& !Character.isUnicodeIdentifierPart(c) && ":-_.".indexOf(c) == -1 && !isExtender(c)) { error("Not a name character, U+" + Integer.toHexString(c)); }
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
nameBuffer [nameBufferPos++] = c;
} nameBuffer[nameBufferPos++] = c;
private String readNmtoken (boolean isName) throws SAXException, IOException { char c; if (USE_CHEATS) {loop: for (int i = readBufferPos; i < readBufferLength; i++) { c = readBuffer [i]; switch (c) { case '%': if (expandPE) break loop; // else fall through... // What may legitimately...
int length = delim.length (); char ch [];
int length = delim.length(); char[] ch;
private void require (String delim) throws SAXException, IOException { int length = delim.length (); char ch []; if (length < dataBuffer.length) { ch = dataBuffer; delim.getChars (0, length, ch, 0); } else ch = delim.toCharArray (); if (USE_CHEATS && length <= (readBufferLength - readBufferPos)...
delim.getChars (0, length, ch, 0); } else ch = delim.toCharArray ();
delim.getChars(0, length, ch, 0); } else { ch = delim.toCharArray(); }
private void require (String delim) throws SAXException, IOException { int length = delim.length (); char ch []; if (length < dataBuffer.length) { ch = dataBuffer; delim.getChars (0, length, ch, 0); } else ch = delim.toCharArray (); if (USE_CHEATS && length <= (readBufferLength - readBufferPos)...
if (ch [i] != readBuffer [offset])
{ if (ch[i] != readBuffer[offset]) {
private void require (String delim) throws SAXException, IOException { int length = delim.length (); char ch []; if (length < dataBuffer.length) { ch = dataBuffer; delim.getChars (0, length, ch, 0); } else ch = delim.toCharArray (); if (USE_CHEATS && length <= (readBufferLength - readBufferPos)...
require (ch [i]);
{ require(ch[i]); }
private void require (String delim) throws SAXException, IOException { int length = delim.length (); char ch []; if (length < dataBuffer.length) { ch = dataBuffer; delim.getChars (0, length, ch, 0); } else ch = delim.toCharArray (); if (USE_CHEATS && length <= (readBufferLength - readBufferPos)...
Hashtable attlist;
HashMap attlist;
private void setAttribute (String elName, String name, String type, String enumeration, String value, int valueType) throws Exception { Hashtable attlist; if (skippedPE) return; // Create a new hashtable if necessary. attlist = getElementAttributes (elName); if (attlist == null) attlist = new Hash...
attlist = new Hashtable ();
{ attlist = new HashMap(); }
private void setAttribute (String elName, String name, String type, String enumeration, String value, int valueType) throws Exception { Hashtable attlist; if (skippedPE) return; // Create a new hashtable if necessary. attlist = getElementAttributes (elName); if (attlist == null) attlist = new Hash...
} else { Object attribute [] = new Object [5]; attribute [0] = type; attribute [1] = value; attribute [2] = new Integer (valueType); attribute [3] = enumeration; attribute [4] = null; attlist.put (name, attribute);
} else { AttributeDecl attribute = new AttributeDecl(); attribute.type = type; attribute.value = value; attribute.valueType = valueType; attribute.enumeration = enumeration; attlist.put(name, attribute);
private void setAttribute (String elName, String name, String type, String enumeration, String value, int valueType) throws Exception { Hashtable attlist; if (skippedPE) return; // Create a new hashtable if necessary. attlist = getElementAttributes (elName); if (attlist == null) attlist = new Hash...
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException
private void setElement(String name, int contentType, String contentModel, HashMap attributes) throws SAXException
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException { if (skippedPE) return; Object element [] = (Object []) elementInfo.get (name); // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { element = new Obj...
Object element [] = (Object []) elementInfo.get (name);
ElementDecl element = (ElementDecl) elementInfo.get(name);
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException { if (skippedPE) return; Object element [] = (Object []) elementInfo.get (name); // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { element = new Obj...
if (element == null) { element = new Object [3]; element [0] = new Integer (contentType); element [1] = contentModel; element [2] = attributes; elementInfo.put (name, element);
if (element == null) { element = new ElementDecl(); element.contentType = contentType; element.contentModel = contentModel; element.attributes = attributes; elementInfo.put(name, element);
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException { if (skippedPE) return; Object element [] = (Object []) elementInfo.get (name); // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { element = new Obj...
if (((Integer) element [0]).intValue () == CONTENT_UNDECLARED) { element [0] = new Integer (contentType); element [1] = contentModel; } else
if (element.contentType == CONTENT_UNDECLARED) { element.contentType = contentType; element.contentModel = contentModel; } else {
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException { if (skippedPE) return; Object element [] = (Object []) elementInfo.get (name); // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { element = new Obj...
element [2] = attributes;
{ element.attributes = attributes; }
private void setElement ( String name, int contentType, String contentModel, Hashtable attributes ) throws SAXException { if (skippedPE) return; Object element [] = (Object []) elementInfo.get (name); // first <!ELEMENT ...> or <!ATTLIST ...> for this type? if (element == null) { element = new Obj...
private void setExternalEntity (String eName, int eClass, String ids [], String nName)
private void setExternalEntity(String eName, int eClass, ExternalIdentifiers ids, String nName)
private void setExternalEntity (String eName, int eClass, String ids [], String nName) { if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (eClass); entity [1] = ids;// FIXME: shrink!! [2] no longer used, [4] irrelevant given [0] entity [4] = ...
if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (eClass); entity [1] = ids; entity [4] = nName; entityInfo.put (eName, entity);
if (entityInfo.get(eName) == null) { EntityInfo entity = new EntityInfo(); entity.type = eClass; entity.ids = ids; entity.notationName = nName; entityInfo.put(eName, entity);
private void setExternalEntity (String eName, int eClass, String ids [], String nName) { if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (eClass); entity [1] = ids;// FIXME: shrink!! [2] no longer used, [4] irrelevant given [0] entity [4] = ...
if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL); entity [3] = value; entityInfo.put (eName, entity);
if (entityInfo.get(eName) == null) { EntityInfo entity = new EntityInfo(); entity.type = ENTITY_INTERNAL; entity.value = value; entityInfo.put(eName, entity);
private void setInternalEntity (String eName, String value) throws SAXException { if (skippedPE) return; if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL);// FIXME: shrink!! [2] useless entity [3] = value; entityInfo.put (eN...
if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
if (handler.stringInterning) {
private void setInternalEntity (String eName, String value) throws SAXException { if (skippedPE) return; if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL);// FIXME: shrink!! [2] useless entity [3] = value; entityInfo.put (eN...
} else {
} } else {
private void setInternalEntity (String eName, String value) throws SAXException { if (skippedPE) return; if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL);// FIXME: shrink!! [2] useless entity [3] = value; entityInfo.put (eN...
handler.getDeclHandler () .internalEntityDecl (eName, value);
private void setInternalEntity (String eName, String value) throws SAXException { if (skippedPE) return; if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL);// FIXME: shrink!! [2] useless entity [3] = value; entityInfo.put (eN...
handler.getDeclHandler().internalEntityDecl(eName, value); }
private void setInternalEntity (String eName, String value) throws SAXException { if (skippedPE) return; if (entityInfo.get (eName) == null) { Object entity[] = new Object [5]; entity [0] = new Integer (ENTITY_INTERNAL);// FIXME: shrink!! [2] useless entity [3] = value; entityInfo.put (eN...
private void setNotation (String nname, String ids [])
private void setNotation(String nname, ExternalIdentifiers ids)
private void setNotation (String nname, String ids []) throws SAXException { if (skippedPE) return; handler.notationDecl (nname, ids); if (notationInfo.get (nname) == null) notationInfo.put (nname, nname); else // VC: Unique Notation Name handler.verror ("Duplicate notation name decl: " + nnam...
handler.notationDecl (nname, ids); if (notationInfo.get (nname) == null) notationInfo.put (nname, nname);
handler.notationDecl(nname, ids.publicId, ids.systemId, ids.baseUri); if (notationInfo.get(nname) == null) { notationInfo.put(nname, nname); }
private void setNotation (String nname, String ids []) throws SAXException { if (skippedPE) return; handler.notationDecl (nname, ids); if (notationInfo.get (nname) == null) notationInfo.put (nname, nname); else // VC: Unique Notation Name handler.verror ("Duplicate notation name decl: " + nnam...
handler.verror ("Duplicate notation name decl: " + nname);
handler.verror("Duplicate notation name decl: " + nname); }
private void setNotation (String nname, String ids []) throws SAXException { if (skippedPE) return; handler.notationDecl (nname, ids); if (notationInfo.get (nname) == null) notationInfo.put (nname, nname); else // VC: Unique Notation Name handler.verror ("Duplicate notation name decl: " + nnam...
if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21) { if (!(encodingName.equals ("ISO-10646-UCS-2") || encodingName.equals ("UTF-16") || encodingName.equals ("UTF-16BE") || encodingName.equals ("UTF-16LE"))) error ("unsupported Unicode encoding", encodingName, "UTF-16");
if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21) { if (!(encodingName.equals("ISO-10646-UCS-2") || encodingName.equals("UTF-16") || encodingName.equals("UTF-16BE") || encodingName.equals("UTF-16LE"))) { error("unsupported Unicode encoding", encodingName, "UTF-16"); }
private void setupDecoding (String encodingName) throws SAXException, IOException { encodingName = encodingName.toUpperCase (); // ENCODING_EXTERNAL indicates an encoding that wasn't // autodetected ... we can use builtin decoders, or // ones from the JVM (InputStreamReader). // Otherwise we can only tweak wh...
if (!encodingName.equals ("ISO-10646-UCS-4")) error ("unsupported 32-bit encoding", encodingName,
if (!encodingName.equals("ISO-10646-UCS-4")) { error("unsupported 32-bit encoding", encodingName,
private void setupDecoding (String encodingName) throws SAXException, IOException { encodingName = encodingName.toUpperCase (); // ENCODING_EXTERNAL indicates an encoding that wasn't // autodetected ... we can use builtin decoders, or // ones from the JVM (InputStreamReader). // Otherwise we can only tweak wh...
if (encodingName.equals ("UTF-16") || encodingName.equals ("ISO-10646-UCS-2"))
if (encodingName.equals("UTF-16") || encodingName.equals("ISO-10646-UCS-2")) {
private void setupDecoding (String encodingName) throws SAXException, IOException { encodingName = encodingName.toUpperCase (); // ENCODING_EXTERNAL indicates an encoding that wasn't // autodetected ... we can use builtin decoders, or // ones from the JVM (InputStreamReader). // Otherwise we can only tweak wh...
private static boolean tryEncoding ( byte sig[], byte b1, byte b2, byte b3, byte b4)
private static boolean tryEncoding(byte[] sig, byte b1, byte b2, byte b3, byte b4)
private static boolean tryEncoding ( byte sig[], byte b1, byte b2, byte b3, byte b4) { return (sig [0] == b1 && sig [1] == b2 && sig [2] == b3 && sig [3] == b4); }
if (tryRead ("<?xml")) { if (tryWhitespace ()) { if (inputStack.size () > 0) { return parseTextDecl (ignoreEncoding); } else { return parseXMLDecl (ignoreEncoding);
if (tryRead("<?xml")) { if (tryWhitespace()) { if (inputStack.size() > 0) { return parseTextDecl(ignoreEncoding); } else { return parseXMLDecl(ignoreEncoding); }
private String tryEncodingDecl (boolean ignoreEncoding) throws SAXException, IOException { // Read the XML/text declaration. if (tryRead ("<?xml")) { if (tryWhitespace ()) { if (inputStack.size () > 0) { return parseTextDecl (ignoreEncoding); } else { return parseXMLDecl (ignoreEncoding); } ...
} else {
else {
private String tryEncodingDecl (boolean ignoreEncoding) throws SAXException, IOException { // Read the XML/text declaration. if (tryRead ("<?xml")) { if (tryWhitespace ()) { if (inputStack.size () > 0) { return parseTextDecl (ignoreEncoding); } else { return parseXMLDecl (ignoreEncoding); } ...
while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': n = (c - 'a') + 10; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': n =...
while (true) { c = readCh(); if (c == ';') {
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
default: error ("illegal character in character reference", c, null);
} else { int n = Character.digit(c, 16); if (n == -1) { error("illegal character in character reference", c, null);
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
} else {
} } else {
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
while (true) { c = readCh (); switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': value *= 10; value += c - '0'; break; case ';':
while (true) { c = readCh(); if (c == ';') {
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
default: error ("illegal character in character reference", c, null);
} else { int n = Character.digit(c, 10); if (n == -1) { error("illegal character in character reference", c, null);
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
error ("illegal XML character reference U+" + Integer.toHexString (value));
{ error("illegal XML character reference U+" + Integer.toHexString(value)); }
private void tryReadCharRef () throws SAXException, IOException { int value = 0; char c; if (tryRead ('x')) {loop1: while (true) { c = readCh (); int n; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = c - '0'; break; case 'a'...
ServantDelegateImpl delegate = new ServantDelegateImpl(a_servant, this, object_key); connectDelegate(object_key, delegate);
ServantDelegateImpl delegate = new ServantDelegateImpl(a_servant, this, object_key); create_and_connect(object_key, a_servant._all_interfaces(this, object_key)[0], delegate);
public byte[] activate_object(Servant a_servant) throws ServantAlreadyActive, WrongPolicy { checkDiscarding(); required(ServantRetentionPolicyValue.RETAIN); required(IdAssignmentPolicyValue.SYSTEM_ID); AOM.Obj exists = aom.findServant(a_servant); if (exists != null) { ...
refTemplate = new RefTemplate();
public gnuPOA(gnuPOA a_parent, String a_name, POAManager a_manager, Policy[] a_policies, ORB_1_4 an_orb ) throws InvalidPolicy { // Add default policies. Policy[] all_policies = StandardPolicies.withDefault(a_policies); name = a_name; parent = a_parent; m_orb = an_...
ServantDelegateImpl delegate = new ServantDelegateImpl(the_Servant, this, object_key); connectDelegate(object_key, delegate);
ServantDelegateImpl delegate = new ServantDelegateImpl(the_Servant, this, object_key); create_and_connect(object_key, the_Servant._all_interfaces(this, object_key)[0], delegate);
public org.omg.CORBA.Object servant_to_reference(Servant the_Servant) throws ServantNotActive, WrongPolicy { required(ServantRetentionPolicyValue.RETAIN); AOM.Obj exists = null; if (!applies(IdUniquenessPolicyValue....
AttributeNode(TemplateNode children, TemplateNode next, TemplateNode name,
AttributeNode(TemplateNode name,
AttributeNode(TemplateNode children, TemplateNode next, TemplateNode name, TemplateNode namespace, Node source) { super(children, next); this.name = name; this.namespace = namespace; this.source = source; }
super(children, next);
AttributeNode(TemplateNode children, TemplateNode next, TemplateNode name, TemplateNode namespace, Node source) { super(children, next); this.name = name; this.namespace = namespace; this.source = source; }
return new AttributeNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet),
TemplateNode ret = new AttributeNode(name.clone(stylesheet),
TemplateNode clone(Stylesheet stylesheet) { return new AttributeNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet), (name...
if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret;
TemplateNode clone(Stylesheet stylesheet) { return new AttributeNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name.clone(stylesheet), (name...
boolean corbaname; ArrayList alt_addr = new ArrayList(); int major = 1; int minor = 0; String host; int port = DEFAULT_PORT; String key; StringTokenizer st = new StringTokenizer(corbaloc, ":@/.,#", true); t = new String[st.countTokens()]; for (int i = 0; i < t.length; i++) { t[i] = st.nextToken(); } p = 0...
return corbaloc(corbaloc, orb, 0);
public synchronized org.omg.CORBA.Object corbaloc(String corbaloc, OrbFunctional orb) throws BAD_PARAM { boolean corbaname; // The alternative addresses, if given. ArrayList alt_addr = new ArrayList(); // The version numbers with default values. int major = 1; int minor = 0; // The host ad...
fireTableDataChanged();
newRowsAdded(new TableModelEvent( this, dataVector.size(), dataVector.size(), -1, TableModelEvent.INSERT) );
public void addRow(Vector rowData) { dataVector.add(rowData); fireTableDataChanged(); }
return columnIdentifiers.size();
return (columnIdentifiers == null ? 0 : columnIdentifiers.size());
public int getColumnCount() { return columnIdentifiers.size(); }
if (columnIdentifiers == null || column >= getColumnCount()) { return super.getColumnName(column);
String result = ""; if (columnIdentifiers == null) result = super.getColumnName(column); else { if (column < getColumnCount()) { Object id = columnIdentifiers.get(column); if (id != null) result = id.toString(); else result = super.getColumnName(column);
public String getColumnName(int column) { // Check for Column if (columnIdentifiers == null || column >= getColumnCount()) { return super.getColumnName(column); } // Return Column name return (String) columnIdentifiers.get(column); }
return (String) columnIdentifiers.get(column);
} return result;
public String getColumnName(int column) { // Check for Column if (columnIdentifiers == null || column >= getColumnCount()) { return super.getColumnName(column); } // Return Column name return (String) columnIdentifiers.get(column); }
fireTableDataChanged();
fireTableRowsInserted(row,row);
public void insertRow(int row, Vector rowData) { dataVector.add(row, rowData); fireTableDataChanged(); }
for (int index = 0; index < (endIndex - startIndex); index++) { Vector vector = (Vector) dataVector.remove(startIndex); dataVector.add(toIndex, vector);
Vector removed = new Vector(); for (int i = endIndex; i >= startIndex; i--) { removed.add(this.dataVector.remove(i)); } for (int i = 0; i <= endIndex - startIndex; i++) { dataVector.insertElementAt(removed.get(i), toIndex);
public void moveRow(int startIndex, int endIndex, int toIndex) { for (int index = 0; index < (endIndex - startIndex); index++) { Vector vector = (Vector) dataVector.remove(startIndex); dataVector.add(toIndex, vector); } fireTableDataChanged(); }
fireTableDataChanged();
fireTableRowsDeleted(row,row);
public void removeRow(int row) { dataVector.remove(row); fireTableDataChanged(); }
if (columnIdentifiers != null)
public void setColumnCount(int columnCount) { for (int i = 0; i < dataVector.size(); ++i) { ((Vector) dataVector.get(i)).setSize(columnCount); } columnIdentifiers.setSize(columnCount); fireTableDataChanged(); }
setColumnCount(columnIdentifiers.size());
setColumnCount((columnIdentifiers == null ? 0 : columnIdentifiers.size()));
public void setColumnIdentifiers(Vector columnIdentifiers) { this.columnIdentifiers = columnIdentifiers; setColumnCount(columnIdentifiers.size()); }
fireTableDataChanged();
fireTableRowsDeleted(rowCount,existingRowCount-1); } else { int rowsToAdd = rowCount - existingRowCount; for (int i = 0; i < rowsToAdd; i++) { Vector tmp = new Vector(); tmp.setSize(columnIdentifiers.size()); dataVector.add(tmp); } fireTableRowsInserted(existingRowCount,rowCount-1); }
public void setRowCount(int rowCount) { dataVector.setSize(rowCount); fireTableDataChanged(); }
fireTableDataChanged();
fireTableCellUpdated(row,column);
public void setValueAt(Object value, int row, int column) { ((Vector) dataVector.get(row)).set(column, value); fireTableDataChanged(); }
constLocals.remove(index);
public final void visit_iinc(int index, int incValue) { final int ebpOfs = stackFrame.getEbpOffset(typeSizeInfo, index); // pin down other references to this local vstack.loadLocal(eContext, ebpOfs); if (incValue == 1) { os.writeINC(BITS32, helper.BP, ebpOfs); } else { os.writeADD(BITS32, helper.BP, ebpOfs, i...
eContext, JvmType.INT, false);
eContext, JvmType.INT, true);
public final void visit_instanceof(VmConstClass classRef) { // Resolve the classRef classRef.resolve(loader); // Prepare final X86RegisterPool pool = eContext.getGPRPool(); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // It is a...
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType<?> cls) { if (!cls.isInitialized()) { os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit,...
public final boolean writeClassInitialize(VmMethod method) { if (method.isStatic() && !method.isInitializer()) { final VmType<?> cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); os.writePUSH(aax); final int typeOfs = getSharedStaticsO...
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType<?> cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); ...
os.writePUSH(classReg); invokeJavaMethod(entryPoints.getVmTypeInitialize()); if (os.isCode32()) { os.writePOPA(); } else { os.writePOP(X86Register.R15); os.writePOP(X86Register.R14); os.writePOP(X86Register.R13); os.writePOP(X86Register.R11); os.writePOP(X86Register.R10); os.writePOP(X86Register.R9); os.writePOP(X86Re...
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType<?> cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); ...
return false;
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType<?> cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); ...
public final void writeGetStaticsEntry64(Label curInstrLabel, GPR64 dstReg, VmSharedStaticsEntry entry) {
public final void writeGetStaticsEntry64(Label curInstrLabel, GPR lsbDst, GPR msbReg, VmSharedStaticsEntry entry) {
public final void writeGetStaticsEntry64(Label curInstrLabel, GPR64 dstReg, VmSharedStaticsEntry entry) { writeLoadSTATICS(curInstrLabel, "gs64", true); os .writeMOV(BITS64, dstReg, this.STATICS, getSharedStaticsOffset(entry)); }
os .writeMOV(BITS64, dstReg, this.STATICS, getSharedStaticsOffset(entry));
final int staticsOfs = getSharedStaticsOffset(entry); os.writeMOV(INTSIZE, msbReg, this.STATICS, staticsOfs + 4); os.writeMOV(INTSIZE, lsbDst, this.STATICS, staticsOfs + 0);
public final void writeGetStaticsEntry64(Label curInstrLabel, GPR64 dstReg, VmSharedStaticsEntry entry) { writeLoadSTATICS(curInstrLabel, "gs64", true); os .writeMOV(BITS64, dstReg, this.STATICS, getSharedStaticsOffset(entry)); }
public final void writePutStaticsEntry64(Label curInstrLabel, GPR64 srcReg, VmSharedStaticsEntry entry) {
public final void writePutStaticsEntry64(Label curInstrLabel, GPR lsbSrc, GPR msbSrc, VmSharedStaticsEntry entry) {
public final void writePutStaticsEntry64(Label curInstrLabel, GPR64 srcReg, VmSharedStaticsEntry entry) { writeLoadSTATICS(curInstrLabel, "ps64", true); os .writeMOV(BITS64, this.STATICS, getSharedStaticsOffset(entry), srcReg); }
os .writeMOV(BITS64, this.STATICS, getSharedStaticsOffset(entry), srcReg);
final int staticsOfs = getSharedStaticsOffset(entry); os.writeMOV(BITS32, this.STATICS, staticsOfs + 4, msbSrc); os.writeMOV(BITS32, this.STATICS, staticsOfs + 0, lsbSrc);
public final void writePutStaticsEntry64(Label curInstrLabel, GPR64 srcReg, VmSharedStaticsEntry entry) { writeLoadSTATICS(curInstrLabel, "ps64", true); os .writeMOV(BITS64, this.STATICS, getSharedStaticsOffset(entry), srcReg); }
requestRegister(EAX, val); requestRegister(EDX, val);
L1AHelper.requestRegister(eContext, EAX, val); L1AHelper.requestRegister(eContext, EDX, val);
private final void dwreturn(int jvmType) { final DoubleWordItem val = (DoubleWordItem) vstack.pop(jvmType); // Return value must be in EAX:EDX if (!(val.uses(EAX) && val.uses(EDX))) { if (val.uses(EAX) || val.uses(EDX)) { val.push(eContext); } requestRegister(EAX, val); requestRegister(EDX, val); val.l...
requestRegister(ECX, shift);
L1AHelper.requestRegister(eContext, ECX, shift);
private final void ishift(int operation) { final IntItem shift = vstack.popInt(); final boolean isconst = shift.isConstant(); if (!isconst) { requestRegister(ECX, shift); shift.loadTo(eContext, ECX); } // Pop & load final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOCAL); if (val.isLoca...
requestRegister(EAX);
L1AHelper.requestRegister(eContext, EAX);
public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); // Request tmp register final Register classr = requestRegister(JvmType.INT, false); // Pop final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register...
final Register classr = requestRegister(JvmType.INT, false);
final Register classr = L1AHelper.requestRegister(eContext, JvmType.INT, false);
public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); // Request tmp register final Register classr = requestRegister(JvmType.INT, false); // Pop final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register...
releaseRegister(EAX);
L1AHelper.releaseRegister(eContext, EAX);
public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); // Request tmp register final Register classr = requestRegister(JvmType.INT, false); // Pop final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register...
releaseRegister(classr);
L1AHelper.releaseRegister(eContext, classr);
public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); // Request tmp register final Register classr = requestRegister(JvmType.INT, false); // Pop final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register...
final IntItem result = (IntItem) requestWordRegister(JvmType.INT, false);
final IntItem result = (IntItem) L1AHelper.requestWordRegister( eContext, JvmType.INT, false);
public final void visit_arraylength() { final RefItem ref = vstack.popRef(); final IntItem result = (IntItem) requestWordRegister(JvmType.INT, false); // Load ref.load(eContext); final Register refr = ref.getRegister(); final Register resultr = result.getRegister(); // Get length os.writeMOV(INTSIZE, resultr, ...
requestRegister(EAX, ref);
L1AHelper.requestRegister(eContext, EAX, ref);
public final void visit_athrow() { final RefItem ref = vstack.popRef(); // Exception must be in EAX if (!ref.uses(EAX)) { requestRegister(EAX, ref); ref.loadTo(eContext, EAX); } // Jump helper.writeJumpTableCALL(X86JumpTable.VM_ATHROW_OFS); // Release ref.release(eContext); }
requestRegister(ECX); requestRegister(EAX);
L1AHelper.requestRegister(eContext, ECX); L1AHelper.requestRegister(eContext, EAX);
public final void visit_checkcast(VmConstClass classRef) { // Pre-claim ECX requestRegister(ECX); requestRegister(EAX); // check that top item is a reference final RefItem ref = vstack.popRef(); // Load the ref ref.load(eContext); final Register refr = ref.getRegister(); final Register classr = EAX; final R...
final Register tmpr = requestRegister(JvmType.INT, false);
final Register tmpr = L1AHelper.requestRegister(eContext, JvmType.INT, false);
public final void visit_checkcast(VmConstClass classRef) { // Pre-claim ECX requestRegister(ECX); requestRegister(EAX); // check that top item is a reference final RefItem ref = vstack.popRef(); // Load the ref ref.load(eContext); final Register refr = ref.getRegister(); final Register classr = EAX; final R...
releaseRegister(ECX); releaseRegister(classr); releaseRegister(tmpr);
L1AHelper.releaseRegister(eContext, ECX); L1AHelper.releaseRegister(eContext, classr); L1AHelper.releaseRegister(eContext, tmpr);
public final void visit_checkcast(VmConstClass classRef) { // Pre-claim ECX requestRegister(ECX); requestRegister(EAX); // check that top item is a reference final RefItem ref = vstack.popRef(); // Load the ref ref.load(eContext); final Register refr = ref.getRegister(); final Register classr = EAX; final R...
final WordItem iw = requestWordRegister(type, false);
final WordItem iw = L1AHelper.requestWordRegister(eContext, type, false);
public final void visit_getfield(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final VmField field = fieldRef.getResolvedVmField(); if (field.isStatic()) { throw new IncompatibleClassChangeError( "getfield called on static field " + fieldRef.getName()); } final VmInstanceField inf = (VmInstanceField...