rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
while ((name = secprops.getProperty(pname.append(i).toString())) != | while ((name = secprops.getProperty("security.provider." + i++)) != | private static void loadProviders() { String separator = System.getProperty("file.separator"); String secfilestr = System.getProperty("java.home") + separator + "lib" + separator + "security" + separator + "classpath.security"; providerCount = 0; try { File secFile = new File(secfilestr); ... |
public void generate(CodeGenerator cg, List methods, Context context) { | public void generate(CodeGenerator cg, Context context) { | public void generate(CodeGenerator cg, List methods, Context context) { cg.declare_field(Modifier.PRIVATE, Object.class, DELEGATE); cg.begin_method(Modifier.PRIVATE | Modifier.SYNCHRONIZED | Modifier.FINAL, Object.class, LOAD_PRIVATE, ... |
for (Iterator it = methods.iterator(); it.hasNext();) { | for (Iterator it = context.getMethods(); it.hasNext();) { | public void generate(CodeGenerator cg, List methods, Context context) { cg.declare_field(Modifier.PRIVATE, Object.class, DELEGATE); cg.begin_method(Modifier.PRIVATE | Modifier.SYNCHRONIZED | Modifier.FINAL, Object.class, LOAD_PRIVATE, ... |
cg.end_block(); cg.handle_undeclared(method.getExceptionTypes(), handler); | public void generate(CodeGenerator cg, List methods, Context context) { cg.declare_field(Modifier.PRIVATE, Object.class, DELEGATE); cg.begin_method(Modifier.PRIVATE | Modifier.SYNCHRONIZED | Modifier.FINAL, Object.class, LOAD_PRIVATE, ... | |
public void generateStatic(CodeGenerator cg, List methods) { } | public void generateStatic(CodeGenerator cg, Context context) { } | public void generateStatic(CodeGenerator cg, List methods) { } |
logger.debug("Loading wrapped class:"+childClassName) | getLogger().debug("Loading wrapped class:"+childClassName); | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... |
logger.debug("Wrapped class instantiated:"+child); | getLogger().debug("Wrapped class instantiated:"+child); | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... |
logger.debug("Wrapped class LogEnabled"); | getLogger().debug("Wrapped class LogEnabled"); | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... |
logger.debug("Wrapped class Serviced"); | getLogger().debug("Wrapped class Serviced"); | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... |
logger.debug("Wrapped class Configured"); | getLogger().debug("Wrapped class Configured"); | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... |
throw new ConfigurationException ("Cannot instatiate the wrapped Module of class:"+childClassName, e); } } | public void configure(Configuration config) throws ConfigurationException { Configuration childConf = config.getChild("component-instance"); String childClassName = childConf.getAttribute("class"); logger.debug("Loading wrapped class:"+childClassName) try{ chil... | |
filter.SetOutputMinimum( Integer.parseInt( argv[2] ) ); filter.SetOutputMaximum( Integer.parseInt( argv[3] ) ); | filter.SetOutputMinimum( Short.parseShort( argv[2] ) ); filter.SetOutputMaximum( Short.parseShort( argv[3] ) ); | public static void main( String argv[] ) { System.out.println("SigmoidImageFilter Example"); itkImageFileReaderUC2_Pointer reader = itkImageFileReaderUC2.itkImageFileReaderUC2_New(); itkImageFileWriterUC2_Pointer writer = itkImageFileWriterUC2.itkImageFileWriterUC2_New(); itkSigmoidImageFilterUC2UC2_Poin... |
resolved._searched |= _module.isSearched(); | resolved._searched |= _module.isSearched(); resolved._dds.putAll(_dds); | public boolean loadData(String conf, boolean shouldBePublic) { boolean loaded = false; if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) { markRootModuleConfLoaded(); if (_md == null) { DependencyResolver resolv... |
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer"); | createLogger(); | public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer"); // get asse... |
ColorModel cm; | ColorModel cm = null; | public BufferedImage(int w, int h, int type) { ColorModel cm; boolean alpha = false; boolean premultiplied = false; switch (type) { case TYPE_4BYTE_ABGR_PRE: case TYPE_INT_ARGB_PRE: premultiplied = true; // fall through case TYPE_INT_ARGB: case TYPE_4BYTE_ABGR: alpha = true; ... |
int[] masks; | int[] masks = null; | public BufferedImage(int w, int h, int type) { ColorModel cm; boolean alpha = false; boolean premultiplied = false; switch (type) { case TYPE_4BYTE_ABGR_PRE: case TYPE_INT_ARGB_PRE: premultiplied = true; // fall through case TYPE_INT_ARGB: case TYPE_4BYTE_ABGR: alpha = true; ... |
if(!currentLine.startsWith("#")){ | if(!currentLine.startsWith("#")&&!(currentLine.trim().length()==0)){ | protected void load(String file) throws ConfigurationException { Source source = null; BufferedReader in = null; try { source = m_resolver.resolveURI(file); in = new BufferedReader(new InputStreamReader(source.getInputStream())); m_propert... |
m_properties.put(name,value); | protected void load(String file) throws ConfigurationException { Source source = null; BufferedReader in = null; try { source = m_resolver.resolveURI(file); in = new BufferedReader(new InputStreamReader(source.getInputStream())); m_propert... | |
for (ListIterator iter = _ivyPatterns.listIterator(); iter.hasNext();) { | for (ListIterator iter = getIvyPatterns().listIterator(); iter.hasNext();) { | public void dumpConfig() { super.dumpConfig(); Message.debug("\t\tivy patterns:"); for (ListIterator iter = _ivyPatterns.listIterator(); iter.hasNext();) { String p = (String)iter.next(); Message.debug("\t\t\t"+p); } Message.debug("\t\tartifact patterns:"); ... |
for (ListIterator iter = _artifactPatterns.listIterator(); iter.hasNext();) { | for (ListIterator iter = getArtifactPatterns().listIterator(); iter.hasNext();) { | public void dumpConfig() { super.dumpConfig(); Message.debug("\t\tivy patterns:"); for (ListIterator iter = _ivyPatterns.listIterator(); iter.hasNext();) { String p = (String)iter.next(); Message.debug("\t\t\t"+p); } Message.debug("\t\tartifact patterns:"); ... |
} | alive = hasBeenDone = true; } | public AbstractUndoableEdit() { } // AbstractUndoableEdit() |
public boolean addEdit(UndoableEdit anEdit) | public boolean addEdit(UndoableEdit edit) | public boolean addEdit(UndoableEdit anEdit) { return false; } // addEdit() |
if (alive == true && hasBeenDone == false) return true; return false; } | return alive && !hasBeenDone; } | public boolean canRedo() { if (alive == true && hasBeenDone == false) return true; return false; } // canRedo() |
if (alive == true && hasBeenDone == true) return true; return false; } | return alive && hasBeenDone; } | public boolean canUndo() { if (alive == true && hasBeenDone == true) return true; return false; } // canUndo() |
if (getPresentationName().equals("")) return RedoName; return RedoName + " " + getPresentationName(); } | String msg, pres; msg = UIManager.getString("AbstractUndoableEdit.redoText"); if (msg == null) msg = RedoName; pres = getPresentationName(); if ((pres == null) || (pres.length() == 0)) return msg; else return msg + ' ' + pres; } | public String getRedoPresentationName() { if (getPresentationName().equals("")) return RedoName; return RedoName + " " + getPresentationName(); } // getRedoPresentationName() |
if (getPresentationName().equals("")) return UndoName; return UndoName + " " + getPresentationName(); } | String msg, pres; msg = UIManager.getString("AbstractUndoableEdit.undoText"); if (msg == null) msg = UndoName; pres = getPresentationName(); if ((pres == null) || (pres.length() == 0)) return msg; else return msg + ' ' + pres; } | public String getUndoPresentationName() { if (getPresentationName().equals("")) return UndoName; return UndoName + " " + getPresentationName(); } // getUndoPresentationName() |
public boolean replaceEdit(UndoableEdit anEdit) | public boolean replaceEdit(UndoableEdit edit) | public boolean replaceEdit(UndoableEdit anEdit) { return false; } // replaceEdit() |
return (super.toString() + " hasBeenDone: " + hasBeenDone + " alive: " + alive); | return super.toString() + " hasBeenDone: " + hasBeenDone + " alive: " + alive; | public String toString() { return (super.toString() + " hasBeenDone: " + hasBeenDone + " alive: " + alive); } |
if (csmart != null) { experiment = csmart.getRunningExperiment(); setHostToMonitor(experiment); listener = new MyExperimentListener(this); experiment.addExperimentListener(listener); } | refreshAgents(); | public CSMARTUL(CSMART csmart) { this.csmart = csmart; if (csmart != null) { experiment = csmart.getRunningExperiment(); setHostToMonitor(experiment); listener = new MyExperimentListener(this); experiment.addExperimentListener(listener); } // create one version of properties for all ob... |
{ int len = version.length (); for (int i = 0; i < len; i++) { char c = version.charAt (i); if ('0' <= c && c <= '9') continue; if (c == '_' || c == '.' || c == ':' || c == '-') continue; if ('a' <= c && c <= 'z') continue; if ('A' <= c && c <= 'Z') continue; error ("illegal character in version", version, "1.0"); } } | { int len = version.length(); for (int i = 0; i < len; i++) { char c = version.charAt(i); if ('0' <= c && c <= '9') { continue; } if (c == '_' || c == '.' || c == ':' || c == '-') { continue; } if ('a' <= c && c <= 'z') { continue; } if ('A' <= c && c <= 'Z') { continue; } error ("illegal character in version", version... | private void checkLegalVersion (String version) throws SAXException { int len = version.length (); for (int i = 0; i < len; i++) { char c = version.charAt (i); if ('0' <= c && c <= '9') continue; if (c == '_' || c == '.' || c == ':' || c == '-') continue; if ('a' <= c && c <= 'z') continue;... |
{ int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c)); if (c == 0x0085 && xmlVersion == XML_11) c = '\r'; readBuffer [j] = c; if (c == '\r') { sawCR = true;... | { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer[i] & 0xff); if ((c & mask) != 0) { throw new CharConversionException("non-ASCII character U+" + Integer.toHexString(c)); } if (c == 0x0085 && xmlVersion == XML_11) { c = '\r'; } readBuffer[j] = c; if (c == '\r') { sawCR = t... | private void copyIso8859_1ReadBuffer (int count, char mask) throws IOException { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString ... |
{ int j = readBufferPos; if (count > 0 && (count % 2) != 0) { encodingError ("odd number of bytes in UCS-2 encoding", -1, count); } if (shift1 == 0) { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i + 1] << 8); c |= 0xff & rawReadBuffer [i]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } ... | { int j = readBufferPos; if (count > 0 && (count % 2) != 0) { encodingError("odd number of bytes in UCS-2 encoding", -1, count); } if (shift1 == 0) { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer[i + 1] << 8); c |= 0xff & rawReadBuffer[i]; readBuffer[j++] = c; if (c == '\r') { sawCR = true; } } ... | private void copyUcs2ReadBuffer (int count, int shift1, int shift2) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 2) != 0) { encodingError ("odd number of bytes in UCS-2 encoding", -1, count); } // The loops are faster with less internal brancing; hence two if (shift1 == 0) { // "... |
{ int j = readBufferPos; if (count > 0 && (count % 4) != 0) { encodingError ( "number of bytes in UCS-4 encoding not divisible by 4", -1, count); } for (int i = 0; i < count; i += 4) { int value = (((rawReadBuffer [i] & 0xff) << shift1) | ((rawReadBuffer [i + 1] & 0xff) << shift2) | ((rawReadBuffer [i + 2] & 0xff) << ... | { int j = readBufferPos; if (count > 0 && (count % 4) != 0) { encodingError("number of bytes in UCS-4 encoding " + "not divisible by 4", -1, count); } for (int i = 0; i < count; i += 4) { int value = (((rawReadBuffer [i] & 0xff) << shift1) | ((rawReadBuffer [i + 1] & 0xff) << shift2) | ((rawReadBuffer [i + 2] & 0xff) ... | private void copyUcs4ReadBuffer (int count, int shift1, int shift2, int shift3, int shift4) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 4) != 0) { encodingError ( "number of bytes in UCS-4 encoding not divisible by 4", -1, count); } for (int i = 0; i < count; i... |
while (i < count) { b1 = rawReadBuffer[i++]; | private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (coun... | |
while (i < count) { b1 = rawReadBuffer [i++]; if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); if ((c == 0x0085 || c == 0x000a) && sawCR) continue; if(c == 0x0085 && xmlVersion =... | if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte(i++, count)); if (c < 0x0080) { encodingError("Illegal two byte UTF-8 sequence", c, 0); } if ((c == 0x0085 || c == 0x000a) && sawCR) { continue; } if (c == 0x0085 && xmlVersion == XML_11) { readBuffer[j++] = '\r'; } } els... | private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (coun... |
private void dataBufferAppend (char c) { if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; } | private void dataBufferAppend(char c) { if (dataBufferPos >= dataBuffer.length) { dataBuffer = (char[]) extendArray(dataBuffer, dataBuffer.length, dataBufferPos); } dataBuffer[dataBufferPos++] = c; } | private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; } |
private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; | private void dataBufferNormalize() { int i = 0; int j = 0; int end = dataBufferPos; while (j < end && dataBuffer[j] == ' ') { j++; } while (end > j && dataBuffer[end - 1] == ' ') { end --; } | private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { ... |
while (j < end && dataBuffer [j] == ' ') { j++; } while (end > j && dataBuffer [end - 1] == ' ') { end --; } while (j < end) { char c = dataBuffer [j++]; if (c == ' ') { while (j < end && dataBuffer [j++] == ' ') continue; dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] ... | while (j < end) { char c = dataBuffer[j++]; if (c == ' ') { while (j < end && dataBuffer[j++] == ' ') { continue; } dataBuffer[i++] = ' '; dataBuffer[i++] = dataBuffer[j - 1]; } else { dataBuffer[i++] = c; } } dataBufferPos = i; } | private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { ... |
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); } | private Iterator declaredAttributes(ElementDecl element) { HashMap attlist; if (element == null) { return null; } if ((attlist = element.attributes) == null) { return null; } return attlist.keySet().iterator(); } | private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); } |
{ byte signature[] = new byte [4]; | { byte[] signature = new byte[4]; | private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, ... |
if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x3c)) { encoding = ENCODING_UCS_4_1234; | if (tryEncoding(signature, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x3c)) { encoding = ENCODING_UCS_4_1234; } else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00)) { encoding = ENCODING_UCS_4_4321; } else if (tryEncoding(signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) ... | private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, ... |
} else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00)) { encoding = ENCODING_UCS_4_4321; | } | private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, ... |
} else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) 0x00)) { encoding = ENCODING_UCS_4_2143; | else if (tryEncoding(signature, (byte) 0xfe, (byte) 0xff)) { encoding = ENCODING_UCS_2_12; is.read(); is.read(); } else if (tryEncoding(signature, (byte) 0xff, (byte) 0xfe)) { encoding = ENCODING_UCS_2_21; is.read(); is.read(); } else if (tryEncoding(signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x3f)) {... | private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, ... |
} else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x00)) { encoding = ENCODING_UCS_4_3412; } else if (tryEncoding (signature, (byte) 0xfe, (byte) 0xff)) { encoding = ENCODING_UCS_2_12; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0xff, (byte) 0xfe)) { ... | else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x3f, (byte) 0x78, (byte) 0x6d)) { encoding = ENCODING_UTF_8; prefetchASCIIEncodingDecl(); } else if (signature[0] == (byte) 0xef && signature[1] == (byte) 0xbb && signature[2] == (byte) 0xbf) { encoding = ENCODING_UTF_8; is.read(); is.read(); is.read(); } else ... | private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, ... |
{ if (value != -1) message = message + " (character code: 0x" + Integer.toHexString (value) + ')'; error (message); } | { if (value != -1) { message = message + " (character code: 0x" + Integer.toHexString(value) + ')'; error(message); } } | private void encodingError (String message, int value, int offset) throws SAXException { if (value != -1) message = message + " (character code: 0x" + Integer.toHexString (value) + ')'; error (message); } |
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (a... | private Object extendArray(Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) { newSize = requiredSize + 1; } if (array instanceof char[]) { newArray = new char[newSize]; } else... | private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new... |
readBufferOverflow = -1; | readBufferOverflow = -1; loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer[j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else { readBuffer[i++] = '\n'; } break loop; } else if (readBuffer[j + 1] == '\n') { j++; } ... | private void filterCR (boolean moreData) { int i, j; readBufferOverflow = -1;loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer [j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else // C... |
loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer [j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else readBuffer [i++] = '\n'; break loop; } else if (readBuffer [j + 1] == '\n') { j++; } readBuffer [i] = '\n'; brea... | case '\n': default: readBuffer[i] = readBuffer[j]; break; } } readBufferLength = i; } | private void filterCR (boolean moreData) { int i, j; readBufferOverflow = -1;loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer [j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else // C... |
private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); } | private AttributeDecl getAttribute(String elName, String name) { HashMap attlist = getElementAttributes(elName); return (attlist == null) ? null : (AttributeDecl) attlist.get(name); } | private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); } |
public String getAttributeDefaultValue (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [1]; } } | public String getAttributeDefaultValue(String name, String aname) { AttributeDecl attribute = getAttribute(name, aname); return (attribute == null) ? null : attribute.value; } | public String getAttributeDefaultValue (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [1]; } } |
public int getAttributeDefaultValueType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return ATTRIBUTE_DEFAULT_UNDECLARED; } else { return ((Integer) attribute [2]).intValue (); } } | public int getAttributeDefaultValueType(String name, String aname) { AttributeDecl attribute = getAttribute(name, aname); return (attribute == null) ? ATTRIBUTE_DEFAULT_UNDECLARED : attribute.valueType; } | public int getAttributeDefaultValueType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return ATTRIBUTE_DEFAULT_UNDECLARED; } else { return ((Integer) attribute [2]).intValue (); } } |
public String getAttributeEnumeration (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [3]; } } | public String getAttributeEnumeration(String name, String aname) { AttributeDecl attribute = getAttribute(name, aname); return (attribute == null) ? null : attribute.enumeration; } | public String getAttributeEnumeration (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { // assert: attribute [0] is "ENUMERATION" or "NOTATION" return (String) attribute [3]; } } |
public String getAttributeType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } } | public String getAttributeType(String name, String aname) { AttributeDecl attribute = getAttribute(name, aname); return (attribute == null) ? null : attribute.type; } | public String getAttributeType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } } |
private int getContentType (Object element [], int defaultType) { int retval; if (element == null) return defaultType; retval = ((Integer) element [0]).intValue (); if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; } | private int getContentType(ElementDecl element, int defaultType) { int retval; if (element == null) { return defaultType; } retval = element.contentType; if (retval == CONTENT_UNDECLARED) { retval = defaultType; } return retval; } | private int getContentType (Object element [], int defaultType) { int retval; if (element == null) return defaultType; retval = ((Integer) element [0]).intValue (); if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; } |
private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; } | private HashMap getElementAttributes(String name) { ElementDecl element = (ElementDecl) elementInfo.get(name); return (element == null) ? null : element.attributes; } | private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; } |
public int getElementContentType (String name) { Object element [] = (Object []) elementInfo.get (name); return getContentType (element, CONTENT_UNDECLARED); } | public int getElementContentType(String name) { ElementDecl element = (ElementDecl) elementInfo.get(name); return getContentType(element, CONTENT_UNDECLARED); } | public int getElementContentType (String name) { Object element [] = (Object []) elementInfo.get (name); return getContentType (element, CONTENT_UNDECLARED); } |
public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } } | public ExternalIdentifiers getEntityIds(String ename) { EntityInfo entity = (EntityInfo) entityInfo.get(ename); return (entity == null) ? null : entity.ids; } | public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } } |
public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } } | public int getEntityType(String ename) { EntityInfo entity = (EntityInfo) entityInfo.get(ename); return (entity == null) ? ENTITY_UNDECLARED : entity.type; } | public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } } |
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } } | public String getEntityValue(String ename) { EntityInfo entity = (EntityInfo) entityInfo.get(ename); return (entity == null) ? null : entity.value; } | public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } } |
{ int val; | { int val; if (pos < count) { val = rawReadBuffer[pos]; } else { val = is.read(); if (val == -1) { encodingError("unfinished multi-byte UTF-8 sequence at EOF", -1, pos); } } | private int getNextUtf8Byte (int pos, int count) throws SAXException, IOException { int val; // Take a character from the buffer // or from the actual input stream. if (pos < count) { val = rawReadBuffer [pos]; } else { val = is.read (); if (val == -1) { encodingError ("unfinished multi-byte UTF-... |
if (pos < count) { val = rawReadBuffer [pos]; } else { val = is.read (); if (val == -1) { encodingError ("unfinished multi-byte UTF-8 sequence at EOF", -1, pos); } } | if ((val & 0xc0) != 0x80) { encodingError("bad continuation of multi-byte UTF-8 sequence", val, pos + 1); } | private int getNextUtf8Byte (int pos, int count) throws SAXException, IOException { int val; // Take a character from the buffer // or from the actual input stream. if (pos < count) { val = rawReadBuffer [pos]; } else { val = is.read (); if (val == -1) { encodingError ("unfinished multi-byte UTF-... |
if ((val & 0xc0) != 0x80) { encodingError ("bad continuation of multi-byte UTF-8 sequence", val, pos + 1); } return (val & 0x3f); } | return (val & 0x3f); } | private int getNextUtf8Byte (int pos, int count) throws SAXException, IOException { int val; // Take a character from the buffer // or from the actual input stream. if (pos < count) { val = rawReadBuffer [pos]; } else { val = is.read (); if (val == -1) { encodingError ("unfinished multi-byte UTF-... |
private void initializeVariables () { line = 1; column = 0; | private void initializeVariables() { line = 1; column = 0; dataBufferPos = 0; dataBuffer = new char[DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char[NAME_BUFFER_INITIAL]; | private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityIn... |
dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; | elementInfo = new HashMap(); entityInfo = new HashMap(); notationInfo = new HashMap(); skippedPE = false; | private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityIn... |
elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable (); skippedPE = false; | currentElement = null; currentElementContent = CONTENT_UNDECLARED; sourceType = INPUT_NONE; inputStack = new LinkedList(); entityStack = new LinkedList(); externalEntity = null; tagAttributePos = 0; tagAttributes = new String[100]; rawReadBuffer = new byte[READ_BUFFER_MAX]; readBufferOverflow = -1; | private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityIn... |
currentElement = null; currentElementContent = CONTENT_UNDECLARED; | scratch = new InputSource(); | private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityIn... |
sourceType = INPUT_NONE; inputStack = new Stack (); entityStack = new Stack (); externalEntity = null; tagAttributePos = 0; tagAttributes = new String [100]; rawReadBuffer = new byte [READ_BUFFER_MAX]; readBufferOverflow = -1; scratch = new InputSource (); inLiteral = false; expandPE = false; peIsError = false; doRe... | inLiteral = false; expandPE = false; peIsError = false; doReport = false; inCDATA = false; symbolTable = new Object[SYMBOL_TABLE_LENGTH][]; } | private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityIn... |
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; | public String intern(char[] ch, int start, int length) { int index = 0; int hash = 0; Object[] bucket; | public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SY... |
for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; if ((bucket = symbolTable [hash]) == null) { bucket = new Object [8]; } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; if (chFound == null) break; if (c... | for (int i = start; i < start + length; i++) { hash = 31 * hash + ch[i]; } hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; if ((bucket = symbolTable[hash]) == null) { bucket = new Object[8]; } else { while (index < bucket.length) { char[] chFound = (char[]) bucket[index]; if (chFound == null) { break; } if ... | public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SY... |
private final boolean isWhitespace (char c) { if (c > 0x20) return false; if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d) return true; return false; } | private final boolean isWhitespace(char c) { if (c > 0x20) { return false; } if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d) { return true; } return false; } | private final boolean isWhitespace (char c) { if (c > 0x20) return false; if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d) return true; return false; // illegal ... } |
{ String name; String type; String enumer = null; | { String name; String type; String enumer = null; name = readNmtoken(true); | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
name = readNmtoken (true); | requireWhitespace(); type = readAttType(); | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
requireWhitespace (); type = readAttType (); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); | if (handler.stringInterning) { if ("ENUMERATION" == type || "NOTATION" == type) { enumer = dataBufferToString(); } } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) { enumer = dataBufferToString(); } } requireWhitespace(); parseDefault(elementName, name, type, enumer); | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
requireWhitespace (); parseDefault (elementName, name, type, enumer); } | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... | |
{ String elementName; requireWhitespace (); elementName = readNmtoken (true); boolean white = tryWhitespace (); while (!tryRead ('>')) { if (!white) error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryWhitespace (); } } | { String elementName; requireWhitespace(); elementName = readNmtoken(true); boolean white = tryWhitespace(); while (!tryRead('>')) { if (!white) { error("whitespace required before attribute definition"); } parseAttDef(elementName); white = tryWhitespace(); } } | private void parseAttlistDecl () throws Exception { String elementName; requireWhitespace (); elementName = readNmtoken (true); boolean white = tryWhitespace (); while (!tryRead ('>')) { if (!white) error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryW... |
{ String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; | { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; aname = readNmtoken(true); type = getAttributeType(name, aname); parseEq(); | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
aname = readNmtoken (true); type = getAttributeType (name, aname); | if (handler.stringInterning) { if (type == "CDATA" || type == null) { value = readLiteral(flags); } else { value = readLiteral(flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral(flags); } else { value = readLiteral(flags | LIT_NORMALIZE); } } | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
parseEq (); | for (int i = 0; i < tagAttributePos; i++) { if (aname.equals(tagAttributes [i])) { error("duplicate attribute", aname, null); } } | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMA... | handler.attribute(aname, value, true); dataBufferPos = 0; if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String[tagAttributes.length * 2]; System.arraycopy(tagAttributes, 0, newAttrib, 0, tagAttributePos); tagAttributes = newAttrib; } tagAttributes[tagAttributePos++] = aname; | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
for (int i = 0; i < tagAttributePos; i++) if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); handler.attribute (aname, value, true); dataBufferPos = 0; if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String [tagAttributes.length * 2]; System.arraycopy (tagAtt... | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... | |
if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) { pureWhite = true; } | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... | |
if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; while (true) { int lineAugment = 0; int columnAugment = 0; int i; | while (true) { int lineAugment = 0; int columnAugment = 0; int i; | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; break; case '\r': case '\t': case ' ': columnAugment++; break; case '&': case '<': columnAugment++; state = 1; break loop; case ']': pureWhite = false; if ((i + 2) < readBufferLength) { ... | for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer[i]) { case '\n': lineAugment++; columnAugment = 0; break; case '\r': case '\t': case ' ': columnAugment++; break; case '&': case '<': columnAugment++; state = 1; break loop; case ']': pureWhite = false; if ((i + 2) < readBufferLength) { i... | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
{ skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('[');... | { skipWhitespace(); if (tryRead("INCLUDE")) { skipWhitespace(); require('['); if (readBuffer != saved) { handler.verror("Illegal Conditional Section/PE nesting"); } skipWhitespace(); while (!tryRead("]]>")) { parseMarkupdecl(); skipWhitespace(); } } else if (tryRead("IGNORE")) { skipWhitespace(); require('['); if (re... | private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitesp... |
{ char c; | { char c; while (true) { parseCharData(); | private void parseContent () throws Exception { char c; while (true) { // consume characters (or ignorable whitspace) until delimiter parseCharData (); // Handle delimiters c = readCh (); switch (c) { case '&': // Found "&" c = readCh (); if (c == '#') { parseCharRef (); } e... |
while (true) { parseCharData (); c = readCh (); switch (c) { case '&': c = readCh (); if (c == '#') { parseCharRef (); } else { unread (c); parseEntityRef (true); } isDirtyCurrentElement = true; break; case '<': dataBufferFlush (); c = readCh (); switch (c) { case '!': c = readCh (); switch (c) { case '-': require... | c = readCh(); switch (c) { case '&': c = readCh(); if (c == '#') { parseCharRef(); } else { unread(c); parseEntityRef(true); } isDirtyCurrentElement = true; break; case '<': dataBufferFlush(); c = readCh(); switch (c) { case '!': c = readCh(); switch (c) { case '-': require('-'); isDirtyCurrentElement = false; parseCo... | private void parseContent () throws Exception { char c; while (true) { // consume characters (or ignorable whitspace) until delimiter parseCharData (); // Handle delimiters c = readCh (); switch (c) { case '&': // Found "&" c = readCh (); if (c == '#') { parseCharRef (); } e... |
{ if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String ... | { if (tryRead("EMPTY")) { setElement(name, CONTENT_EMPTY, null, null); if (!skippedPE) { handler.getDeclHandler().elementDecl(name, "EMPTY"); } return; } else if (tryRead("ANY")) { setElement(name, CONTENT_ANY, null, null); if (!skippedPE) { handler.getDeclHandler().elementDecl(name, "ANY"); } return; } else { String ... | private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead... |
private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; if (!skippedPE) { flags |= LIT_ENTITY_REF; if (handler.getFe... | private void parseDefault(String elementName, String name, String type, String enumer) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; if (!skippedPE) { flags |= LIT_ENTITY_REF; if (handler.stringIn... | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... |
if (!skippedPE) handler.getDeclHandler () .attributeDecl (elementName, name, type, defaultType, value); } | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... | |
{ String rootName, ids[]; | { String rootName; ExternalIdentifiers ids; | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
handler.doctypeDecl (rootName, ids [0], ids [1]); skipWhitespace (); if (tryRead ('[')) { while (true) { doReport = expandPE = true; skipWhitespace (); doReport = expandPE = false; if (tryRead (']')) { break; } else { peIsError = expandPE = true; parseMarkupdecl (); peIsError = expandPE = false; } } } skipWhitespa... | handler.doctypeDecl(rootName, ids.publicId, ids.systemId); skipWhitespace(); if (tryRead('[')) { while (true) { doReport = expandPE = true; skipWhitespace(); doReport = expandPE = false; if (tryRead(']')) { break; } else { peIsError = expandPE = true; parseMarkupdecl(); peIsError = expandPE = false; } } } skipWhit... | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
{ String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; | { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; ElementDecl element; | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
tagAttributePos = 0; | tagAttributePos = 0; gi = readNmtoken(true); if (maybeGetSubset) { InputSource subset = handler.getExternalSubset(gi, handler.getSystemId()); if (subset != null) { String publicId = subset.getPublicId(); String systemId = subset.getSystemId(); handler.warn("modifying document by adding DTD"); handler.doctypeDecl(... | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
gi = readNmtoken (true); | boolean white = tryWhitespace(); c = readCh(); while (c != '/' && c != '>') { unread(c); if (!white) { error("need whitespace between attributes"); } parseAttribute(gi); white = tryWhitespace(); c = readCh(); } Iterator atts = declaredAttributes(element); if (atts != null) { String aname; loop: while (atts.hasNext())... | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
if (maybeGetSubset) { InputSource subset = handler.getExternalSubset (gi, handler.getSystemId ()); if (subset != null) { String publicId = subset.getPublicId (); String systemId = subset.getSystemId (); | switch (c) { case '>': handler.startElement(gi); parseContent(); break; case '/': require('>'); handler.startElement(gi); handler.endElement(gi); break; } | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
handler.warn ("modifying document by adding DTD"); handler.doctypeDecl (gi, publicId, systemId); pushString (null, ">"); pushURL (true, "[dtd]", new String [] { publicId, systemId, null }, subset.getCharacterStream (), subset.getByteStream (), subset.getEncoding (), false); while (true) { doReport = expandPE = tru... | currentElement = oldElement; currentElementContent = oldElementContent; } | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
{ String name; | { String name; requireWhitespace(); name = readNmtoken(true); | private void parseElementDecl () throws Exception { String name; requireWhitespace (); // Read the element type name. name = readNmtoken (true); requireWhitespace (); // Read the content model. parseContentspec (name); skipWhitespace (); require ('>'); } |
requireWhitespace (); name = readNmtoken (true); requireWhitespace (); parseContentspec (name); skipWhitespace (); require ('>'); } | requireWhitespace(); parseContentspec(name); skipWhitespace(); require('>'); } | private void parseElementDecl () throws Exception { String name; requireWhitespace (); // Read the element type name. name = readNmtoken (true); requireWhitespace (); // Read the content model. parseContentspec (name); skipWhitespace (); require ('>'); } |
{ char c; char sep; skipWhitespace (); parseCp (); skipWhitespace (); c = readCh (); switch (c) { case ')': if (readBuffer != saved) handler.verror ("Illegal Group/PE nesting"); dataBufferAppend (')'); c = readCh (); switch (c) { case '*': case '+': case '?': dataBufferAppend (c); break; default: unread (c); } re... | { char c; char sep; skipWhitespace(); parseCp(); skipWhitespace(); c = readCh(); switch (c) { case ')': if (readBuffer != saved) { handler.verror("Illegal Group/PE nesting"); } dataBufferAppend(')'); c = readCh(); switch (c) { case '*': case '+': case '?': dataBufferAppend(c); break; default: unread(c); } return;... | private void parseElements (char saved []) throws Exception { char c; char sep; // Parse the first content particle skipWhitespace (); parseCp (); // Check for end or for a separator. skipWhitespace (); c = readCh (); switch (c) { case ')': // VC: Proper Group/PE Nesting if (readBuffer != saved) hand... |
{ boolean peFlag = false; int flags = 0; | { boolean peFlag = false; int flags = 0; expandPE = false; requireWhitespace(); if (tryRead('%')) { peFlag = true; requireWhitespace(); } expandPE = true; String name = readNmtoken(true); if (name.indexOf(':') >= 0) { error("Illegal character(':') in entity name ", name, null); } if (peFlag) { name = "%" + name; ... | private void parseEntityDecl () throws Exception { boolean peFlag = false; int flags = 0; // Check for a parameter entity. expandPE = false; requireWhitespace (); if (tryRead ('%')) { peFlag = true; requireWhitespace (); } expandPE = true; // Read the entity name, and prepend // '%' if necessary. Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.