rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
CharViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
DoubleViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
FloatViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
IntViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
LongViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset);
ShortViewBufferImpl (ByteBuffer bb, int capacity) { super (capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setBackground(defaults.getColor("Panel.background"));
LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font");
public void installDefaults(JPanel p) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setBackground(defaults.getColor("Panel.background")); p.setOpaque(true); }
MonitorManager.initialize();
public static void initialize() { if (!inited) { // Initialize resource manager final ResourceManager rm = ResourceManagerImpl.initialize(); VmSystem.out = getSystemOut(); /* Initialize the system classloader */ VmSystemClassLoader loader = (VmSystemClas...
static public List<String> getEntryNames(Iterator<FSEntry> it) {
static public List<String> getEntryNames(Iterator<? extends FSEntry> it) {
static public List<String> getEntryNames(Iterator<FSEntry> it) { List<String> names = new ArrayList<String>(); while (it.hasNext()) { FSEntry entry = it.next(); names.add((entry == null) ? null : entry.getName()); } return names; }
static public void listEntries(Iterator<FSEntry> iterator) throws Exception {
static public void listEntries(Iterator<? extends FSEntry> iterator) throws Exception {
static public void listEntries(Iterator<FSEntry> iterator) throws Exception { log.debug("<<< BEGIN listEntries >>>"); int i = 0; log.debug("------- entries ------"); while (iterator.hasNext()) { FSEntry entry = iterator.next(); log.debug(i + ":" + entry); ...
static public String toString(List<String> list) { StringBuffer sb = new StringBuffer("["); for (int i = 0; i < list.size(); i++) { if (i > 0) { sb.append(", "); } sb.append(list.get(i)); } sb.append("]"); return sb.toString();
static public String toString(String filename, int offset, int length) throws IOException { File file = new File(filename); FileInputStream input = new FileInputStream(file); byte[] data = new byte[length]; int nb = input.read(data); String dump = FSUtils.toString(data, 0, nb); input.close(); return dump;
static public String toString(List<String> list) { StringBuffer sb = new StringBuffer("["); for (int i = 0; i < list.size(); i++) { if (i > 0) { sb.append(", "); } sb.append(list.get(i)); } sb.append("]"); return sb.toString(); }
columnModel.addColumnModelListener(this);
public void setColumnModel(TableColumnModel c) { columnModel = c; }
public void addActionListener(ActionListener l) { actions.addElement(l); }
public void addActionListener(ActionListener l) { listenerList.add(ActionListener.class, l); }
public void addActionListener(ActionListener l) { // comp.enableEvents( AWTEvent.ACTION_EVENT_MASK ); actions.addElement(l); }
public void addChangeListener(ChangeListener l) { changes.addElement(l); }
public void addChangeListener(ChangeListener l) { listenerList.add(ChangeListener.class, l); }
public void addChangeListener(ChangeListener l) { changes.addElement(l); }
public void addItemListener(ItemListener l) { items.addElement(l); }
public void addItemListener(ItemListener l) { listenerList.add(ItemListener.class, l); }
public void addItemListener(ItemListener l) { items.addElement(l); }
public void fireItemStateChanged(ItemEvent event) { for (int i = 0; i < items.size(); i++) { ItemListener a = (ItemListener) items.get(i); a.itemStateChanged(event); } }
public void fireItemStateChanged(ItemEvent e) { EventListener[] ll = listenerList.getListeners(ItemListener.class); for (int i = 0; i < ll.length; i++) ((ItemListener)ll[i]).itemStateChanged(e); }
public void fireItemStateChanged(ItemEvent event) { for (int i = 0; i < items.size(); i++) { ItemListener a = (ItemListener) items.get(i); a.itemStateChanged(event); } }
public void fireStateChanged(ChangeEvent event) { for (int i = 0; i < changes.size(); i++) { ChangeListener a = (ChangeListener) changes.get(i); a.stateChanged(event); } }
public void fireStateChanged(ChangeEvent e) { EventListener[] ll = listenerList.getListeners(ChangeListener.class); for (int i = 0; i < ll.length; i++) ((ChangeListener)ll[i]).stateChanged(e); }
public void fireStateChanged(ChangeEvent event) { for (int i = 0; i < changes.size(); i++) { ChangeListener a = (ChangeListener) changes.get(i); a.stateChanged(event); } }
public String getActionCommand() { return com; }
public String getActionCommand() { return actionCommand; }
public String getActionCommand() { return com; }
public int getMnemonic() { return mne; }
public int getMnemonic() { return mnemonic; }
public int getMnemonic() { return mne; }
public boolean isRollover() { return roll; }
public boolean isRollover() { return (stateMask & ROLLOVER) == ROLLOVER; }
public boolean isRollover() { return roll; }
public void removeActionListener(ActionListener l) { actions.removeElement(l); }
public void removeActionListener(ActionListener l) { listenerList.remove(ActionListener.class, l); }
public void removeActionListener(ActionListener l) { actions.removeElement(l); }
public void removeChangeListener(ChangeListener l) { changes.removeElement(l); }
public void removeChangeListener(ChangeListener l) { listenerList.remove(ChangeListener.class, l); }
public void removeChangeListener(ChangeListener l) { changes.removeElement(l); }
public void removeItemListener(ItemListener l) { items.removeElement(l); }
public void removeItemListener(ItemListener l) { listenerList.remove(ItemListener.class, l); }
public void removeItemListener(ItemListener l) { items.removeElement(l); }
public void setActionCommand(String s) { com = s; }
public void setActionCommand(String s) { if (actionCommand != s) { actionCommand = s; fireStateChanged(changeEvent); } }
public void setActionCommand(String s) { com = s; }
public void setArmed(boolean b) { arm = b; }
public void setArmed(boolean a) { changeState(ARMED, a); }
public void setArmed(boolean b) { arm = b; }
public void setEnabled(boolean b) { enabled = b; }
public void setEnabled(boolean e) { changeState(ENABLED, e); }
public void setEnabled(boolean b) { enabled = b; }
public void setGroup(ButtonGroup group) { this.group = group; }
public void setGroup(ButtonGroup g) { if (group != g) { group = g; fireStateChanged(changeEvent); } }
public void setGroup(ButtonGroup group) { this.group = group; }
public void setMnemonic(int key) { mne = key; }
public void setMnemonic(int key) { if (mnemonic != key) { mnemonic = key; fireStateChanged(changeEvent); } }
public void setMnemonic(int key) { mne = key; }
public void setRollover(boolean b) { roll = b; }
public void setRollover(boolean r) { changeState(ROLLOVER, r); }
public void setRollover(boolean b) { roll = b; }
vstack.loadLocal(eContext, disp);
public final void visit_astore(int index) { int disp = stackFrame.getEbpOffset(index); RefItem i = vstack.popRef(); //TODO: implement writeMOV_Const(reg, disp, object); i.load(eContext);// i.loadIf(eContext, ~Item.CONSTANT);//// if (i.getKind() == Item.CONSTANT) {// ...
vstack.loadLocal(eContext, ebpOfs);
public final void visit_dstore(int index) { //TODO: port to orp-style Item val = vstack.popItem(Item.DOUBLE); val.push(eContext); val.release(eContext); int ebpOfs = stackFrame.getWideEbpOffset(index); helper.writePOP64(Register.EAX, Register.EDX); os.writeMOV(INTSIZ...
vstack.loadLocal(eContext, ebpOfs);
public final void visit_fstore(int index) { //TODO: port to orp-style vstack.push(eContext); Item v1 = vstack.popItem(Item.FLOAT); v1.release(eContext); int ebpOfs = stackFrame.getEbpOffset(index); helper.writePOP(FP, ebpOfs); }
vstack.loadLocal(eContext, index);
final int ebpOfs = stackFrame.getEbpOffset(index);
public final void visit_iinc(int index, int incValue) { vstack.loadLocal(eContext, index); // avoid aliasing throubles final int ebpOfs = stackFrame.getEbpOffset(index); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use ...
final int ebpOfs = stackFrame.getEbpOffset(index);
vstack.loadLocal(eContext, ebpOfs);
public final void visit_iinc(int index, int incValue) { vstack.loadLocal(eContext, index); // avoid aliasing throubles final int ebpOfs = stackFrame.getEbpOffset(index); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use ...
vstack.loadLocal(eContext, disp);
public final void visit_istore(int index) { final int disp = stackFrame.getEbpOffset(index); IntItem i = vstack.popInt(); i.loadIf(eContext, ~Item.CONSTANT); if (i.getKind() == Item.CONSTANT) { os.writeMOV_Const(FP, disp, i.getValue()); } else { os.writeMOV(I...
vstack.loadLocal(eContext, ebpOfs);
public final void visit_lstore(int index) { //TODO: port to orp-style vstack.push(eContext); Item v = vstack.popItem(Item.LONG); v.release(eContext); int ebpOfs = stackFrame.getWideEbpOffset(index); helper.writePOP64(T0, T1); os.writeMOV(INTSIZE, FP, ebpOfs, T0); ...
os.writeLEA(Register.ESP, Register.EBP, -(noLocalVars * 4));
if (noLocalVars < 0) { System.out.println("@#@#@#@# noLocalVars = " + noLocalVars); } final int ofs = Math.max(0, noLocalVars) * 4; os.writeLEA(Register.ESP, Register.EBP, -ofs);
public void emitTrailer(int maxLocals) { final int argSlotCount = method.getArgSlotCount(); final Label stackOverflowLabel = helper.genLabel("$$stack-overflow"); // Begin footer // Now start the actual footer os.setObjectRef(footerLabel); /* Go restore the previous current frame */ emitSynchronizationCode(conte...
this.labelPrefix = curInstrLabel + "_" + inlinedMethod + "_";
this.labelPrefix = curInstrLabel + "_" + inlinedMethod.getName() + "_";
public void startInlinedMethod(VmMethod inlinedMethod, Label curInstrLabel) { this.labelPrefix = curInstrLabel + "_" + inlinedMethod + "_"; this.instrLabelPrefix = labelPrefix + "_bci_"; this.addressLabels.clear(); }
void loadLocal(EmitterContext ec, int index) {
void loadLocal(EmitterContext ec, int offsetToFP) {
void loadLocal(EmitterContext ec, int index) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index)) item.load(ec); } }
if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index))
if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == offsetToFP))
void loadLocal(EmitterContext ec, int index) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index)) item.load(ec); } }
"Button.margin", new InsetsUIResource(2, 14, 2, 14),
"Button.margin", new InsetsUIResource(2, 2, 2, 2),
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; // The default Look and Feel happens to use these three purple shades // extensively. Color lightPurple = new Color(0xCC, 0xCC, 0xFF); Color midPurple = new Color(0x99, 0x99, 0xCC); Color darkPurple = new Color(0x6...
public static Border getEtchedBorderUIResource() { return null; }
public static Border getEtchedBorderUIResource() { if (etchedBorderUIResource == null) etchedBorderUIResource = new EtchedBorderUIResource(); return etchedBorderUIResource; }
public static Border getEtchedBorderUIResource() { return null; }
if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTreeUI) o; return instance;
return new MetalTreeUI();
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance =...
public final void copy(Address src, Address dst, int size) {
public final void copy(Address src, Address dst, Extent size) {
public final void copy(Address src, Address dst, int size) { Unsafe.copy(src, dst, size); }
throw new IOException(ex);
final IOException ioe = new IOException("BlockDeviceAPI not found on device"); ioe.initCause(ex); throw ioe;
public MappedFSBlockDeviceSupport(Device parent, long offset, long length) throws IOException { super(parent, offset, length); try { this.parentApi = (FSBlockDeviceAPI) parent.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new IOExcept...
public Iterator iterator() {
public Iterator<IndexEntry> iterator() {
public Iterator iterator() { return new IndexEntryIterator(parentFileRecord, this, getHeader() .getFirstEntryOffset() + 0x18); }
public MarshalException(String s, Exception e)
public MarshalException(String s)
public MarshalException(String s, Exception e) { super(s, e); }
super(s, e);
super(s);
public MarshalException(String s, Exception e) { super(s, e); }
if (e instanceof ItemEvent) { synchronized (this) { state = (((ItemEvent) e).getStateChange() == ItemEvent.SELECTED); } }
dispatchEventImpl(AWTEvent e){ if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e);}
}
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;...
throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c));
{ throw new CharConversionException("non-ASCII character U+" + Integer.toHexString(c)); }
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 ...
readBuffer [j] = c; if (c == '\r') {
} readBuffer[j] = c; if (c == '\r') {
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 ...
} else { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i] << 8); c |= 0xff & rawReadBuffer [i + 1]; readBuffer [j++] = c;
} } else { for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer[i] << 8); c |= 0xff & rawReadBuffer[i + 1]; readBuffer[j++] = c;
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) { // "...
}
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) { // "...
if (count > 0 && (count % 4) != 0) { encodingError ( "number of bytes in UCS-4 encoding not divisible by 4",
if (count > 0 && (count % 4) != 0) { encodingError("number of bytes in UCS-4 encoding " + "not divisible by 4",
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...
encodingError ("Illegal two byte UTF-8 sequence",
{ encodingError("Illegal two byte UTF-8 sequence",
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...
if(c == 0x0085 && xmlVersion == XML_11)
if (c == 0x0085 && xmlVersion == XML_11) {
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...
} else if ((b1 & 0xf0) == 0xe0) {
} } else if ((b1 & 0xf0) == 0xe0) {
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...
encodingError ("Illegal three byte UTF-8 sequence",
{ encodingError("Illegal three byte UTF-8 sequence",
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...
} else if ((b1 & 0xf8) == 0xf0) {
} } else if ((b1 & 0xf8) == 0xf0) {
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...
encodingError ( "UTF-8 value out of range for Unicode",
{ encodingError("UTF-8 value out of range for Unicode",
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 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...
dataBuffer = (char[]) extendArray (dataBuffer,
{ dataBuffer = (char[]) extendArray(dataBuffer,
private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; }
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; }
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; }
if (c == ' ') { while (j < end && dataBuffer [j++] == ' ')
if (c == ' ') { while (j < end && dataBuffer[j++] == ' ') {
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) { ...
dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] = c;
} dataBuffer[i++] = ' '; dataBuffer[i++] = dataBuffer[j - 1]; } else { dataBuffer[i++] = c;
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 [])
private Iterator declaredAttributes(ElementDecl element)
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
Hashtable attlist;
HashMap attlist;
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
if ((attlist = (Hashtable) element [2]) == null)
} if ((attlist = element.attributes) == null) {
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
return attlist.keys ();
} 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, ...
Integer.toHexString (value) + ')'; error (message);
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)
private Object extendArray(Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize)
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...
if (requiredSize < currentSize) {
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...
newArray = new char [newSize];
{ newArray = new char[newSize]; }
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...
newArray = new Object [newSize];
{ newArray = new Object[newSize]; }
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...
throw new RuntimeException ();
{ throw new RuntimeException(); }
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...
} else readBuffer [i++] = '\n';
} else { readBuffer[i++] = '\n'; }
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)
private AttributeDecl getAttribute(String elName, String name)
private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); }
Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (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); }
Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [1]; }
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]; } }
Object attribute[] = getAttribute (name, aname); if (attribute == null) { return ATTRIBUTE_DEFAULT_UNDECLARED; } else { return ((Integer) attribute [2]).intValue (); }
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 (); } }
Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [3]; }
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]; } }
private int getContentType (Object element [], int defaultType)
private int getContentType(ElementDecl element, int defaultType)
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; }
retval = ((Integer) element [0]).intValue ();
} retval = element.contentType;
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 (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)
private HashMap getElementAttributes(String name)
private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; }
Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2];
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]; }
Object element [] = (Object []) elementInfo.get (name); return getContentType (element, CONTENT_UNDECLARED);
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)
public ExternalIdentifiers getEntityIds(String ename)
public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } }
Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; }
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]; } }
Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue ();
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 int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } }
Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3];
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]; } }
}
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } }
elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable ();
elementInfo = new HashMap(); entityInfo = new HashMap(); notationInfo = new HashMap();
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...
inputStack = new Stack (); entityStack = new Stack ();
inputStack = new LinkedList(); entityStack = new LinkedList();
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)
public String intern(char[] ch, int start, int length)
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...
Object bucket [];
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...