bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public abstract int selectionForKey(char value0, ComboBoxModel value1);
|
public abstract int selectionForKey(char value0, ComboBoxModel value1);
| 15,931
|
public void addActionListener(ActionListener value0) { // TODO } // addActionListener()
|
public void addActionListener(ActionListener value0) { // TODO } // addActionListener()
| 15,932
|
public void removeActionListener(ActionListener value0) { // TODO } // removeActionListener()
|
public void removeActionListener(ActionListener value0) { // TODO } // removeActionListener()
| 15,933
|
public int getColumnIndexAtX(int xPosition);
|
public int getColumnIndexAtX(int xPosition);
| 15,934
|
public Enumeration getColumns();
|
public Enumeration getColumns();
| 15,935
|
public int getSelectedColumnCount();
|
public int getSelectedColumnCount();
| 15,936
|
public int[] getSelectedColumns();
|
public int[] getSelectedColumns();
| 15,937
|
public void setSelectionModel(ListSelectionModel model);
|
public void setSelectionModel(ListSelectionModel model);
| 15,938
|
public void characters(char[] c, int off, int len) throws SAXException { if (interrupted) { return; } ctx.appendChild(createText(c, off, len)); }
|
public void characters(char[] c, int off, int len) throws SAXException { if (interrupted || len < 1) { return; } ctx.appendChild(createText(c, off, len)); }
| 15,939
|
public void comment(char[] c, int off, int len) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node comment = createComment(c, off, len); ctx.appendChild(comment); } }
|
public void comment(char[] c, int off, int len) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node comment = createComment(c, off, len); ctx.appendChild(comment); } }
| 15,940
|
public void comment(char[] c, int off, int len) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node comment = createComment(c, off, len); ctx.appendChild(comment); } }
|
public void comment(char[] c, int off, int len) throws SAXException { if (interrupted) { return; if (!inDTD) { Node comment = createComment(c, off, len); ctx.appendChild(comment); }
| 15,941
|
public void processingInstruction(String target, String data) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node pi = createProcessingInstruction(target, data); ctx.appendChild(pi); } }
|
public void processingInstruction(String target, String data) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node pi = createProcessingInstruction(target, data); ctx.appendChild(pi); } }
| 15,942
|
public void processingInstruction(String target, String data) throws SAXException { if (interrupted) { return; } if (!inDTD) { Node pi = createProcessingInstruction(target, data); ctx.appendChild(pi); } }
|
public void processingInstruction(String target, String data) throws SAXException { if (interrupted) { return; if (!inDTD) { Node pi = createProcessingInstruction(target, data); ctx.appendChild(pi); }
| 15,943
|
private static synchronized Calendar getCalendar() { if (cal == null) cal = Calendar.getInstance(); return cal; }
|
private static synchronized Calendar getCalendar() { if (cal == null) cal = Calendar.getInstance(); return cal; }
| 15,945
|
public String getComment() { return comment; }
|
public String getComment() { return comment; }
| 15,946
|
public long getCrc() { return (known & KNOWN_CRC) != 0 ? crc & 0xffffffffL : -1L; }
|
public long getCrc() { return (known & KNOWN_CRC) != 0 ? crc & 0xffffffffL : -1L; }
| 15,947
|
final int getDOSTime() { if ((known & KNOWN_TIME) == 0) return 0; else return dostime; }
|
final int getDOSTime() { if ((known & KNOWN_TIME) == 0) return 0; else return dostime; }
| 15,948
|
public byte[] getExtra() { return extra; }
|
public byte[] getExtra() { return extra; }
| 15,949
|
public long getSize() { return (known & KNOWN_SIZE) != 0 ? size & 0xffffffffL : -1L; }
|
public long getSize() { return (known & KNOWN_SIZE) != 0 ? size & 0xffffffffL : -1L; }
| 15,950
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
| 15,951
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
| 15,952
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
| 15,953
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
|
public long getTime() { if ((known & KNOWN_TIME) == 0) return -1; int sec = 2 * (dostime & 0x1f); int min = (dostime >> 5) & 0x3f; int hrs = (dostime >> 11) & 0x1f; int day = (dostime >> 16) & 0x1f; int mon = ((dostime >> 21) & 0xf) - 1; int year = ((dostime >> 25) & 0x7f) + 1980; /* since 1900 */ try { cal = getCalendar(); synchronized (cal) { cal.set(year, mon, day, hrs, min, sec); return cal.getTime().getTime(); } } catch (RuntimeException ex) { /* Ignore illegal time stamp */ known &= ~KNOWN_TIME; return -1; } }
| 15,954
|
public int hashCode() { return name.hashCode(); }
|
public int hashCode() { return name.hashCode(); }
| 15,955
|
public boolean isDirectory() { int nlen = name.length(); return nlen > 0 && name.charAt(nlen - 1) == '/'; }
|
public boolean isDirectory() { int nlen = name.length(); return nlen > 0 && name.charAt(nlen - 1) == '/'; }
| 15,956
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
| 15,957
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
| 15,958
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
|
public void setTime(long time) { Calendar cal = getCalendar(); synchronized (cal) { cal.setTime(new Date(time * 1000L)); dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25 | (cal.get(Calendar.MONTH) + 1) << 21 | (cal.get(Calendar.DAY_OF_MONTH)) << 16 | (cal.get(Calendar.HOUR_OF_DAY)) << 11 | (cal.get(Calendar.MINUTE)) << 5 | (cal.get(Calendar.SECOND)) >> 1; } dostime = (int) (dostime / 1000L); this.known |= KNOWN_TIME; }
| 15,959
|
public String toString() { return name; }
|
public String toString() { return name; }
| 15,960
|
protected void restorePalette(VgaIO io) { if (palette != null) { final int size = Math.min(256, palette.getMapSize()); final byte[] r = new byte[size]; final byte[] g = new byte[size]; final byte[] b = new byte[size]; palette.getReds(r); palette.getGreens(g); palette.getBlues(b); //log.debug("Restore-Size:" + size + ", R=" + NumberUtils.hex(r)); for (int i = size - 1; i >= 0; i--) { setPaletteEntry(io, i, r[i] & 0xff, g[i] & 0xff, b[i] & 0xff); } } }
|
protected void restorePalette(VgaIO io) { if (palette != null) { final int size = Math.min(256, palette.getMapSize()); final byte[] r = new byte[size]; final byte[] g = new byte[size]; final byte[] b = new byte[size]; palette.getReds(r); palette.getGreens(g); palette.getBlues(b); //log.debug("Restore-Size:" + size + ", R=" + NumberUtils.hex(r)); for (int i = size - 1; i >= 0; i--) { setPaletteEntry(io, i, r[i] & 0xff, g[i] & 0xff, b[i] & 0xff); } } }
| 15,962
|
protected void savePalette(VgaIO io) { final int size = getPaletteSize(io); final byte[] r = new byte[size]; final byte[] g = new byte[size]; final byte[] b = new byte[size]; for (int i = size - 1; i >= 0; i--) { getPaletteEntry(io, i, r, g, b); } //log.debug("Save-Size:" + size + ", R=" + NumberUtils.hex(r)); palette = new IndexColorModel(32/*6*/, size, r, g, b); }
|
protected void savePalette(VgaIO io) { final int size = getPaletteSize(io); final byte[] r = new byte[size]; final byte[] g = new byte[size]; final byte[] b = new byte[size]; for (int i = size - 1; i >= 0; i--) { getPaletteEntry(io, i, r, g, b); } //log.debug("Save-Size:" + size + ", R=" + NumberUtils.hex(r)); palette = new IndexColorModel(32/*6*/, size, r, g, b); }
| 15,964
|
private void moveDividerTo(int locationIndex) { Insets insets = splitPane.getInsets(); switch (locationIndex) { case 1: splitPane.setDividerLocation(splitPane.getLastDividerLocation()); break; case 0: int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left : insets.top; splitPane.setDividerLocation(top); break; case 2: int bottom; if (orientation == JSplitPane.HORIZONTAL_SPLIT) bottom = splitPane.getBounds().width - insets.right - dividerSize; else bottom = splitPane.getBounds().height - insets.bottom - dividerSize; splitPane.setDividerLocation(bottom); break; } }
|
void moveDividerTo(int locationIndex) { Insets insets = splitPane.getInsets(); switch (locationIndex) { case 1: splitPane.setDividerLocation(splitPane.getLastDividerLocation()); break; case 0: int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left : insets.top; splitPane.setDividerLocation(top); break; case 2: int bottom; if (orientation == JSplitPane.HORIZONTAL_SPLIT) bottom = splitPane.getBounds().width - insets.right - dividerSize; else bottom = splitPane.getBounds().height - insets.bottom - dividerSize; splitPane.setDividerLocation(bottom); break; } }
| 15,965
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
| 15,966
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
| 15,967
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
|
public IndexedPropertyDescriptor(String name, Method getMethod, Method setMethod, Method getIndex, Method setIndex) throws IntrospectionException { super(name); if(getMethod != null && getMethod.getParameterTypes().length > 0) { throw new IntrospectionException("get method has parameters"); } if(getMethod != null && setMethod.getParameterTypes().length != 1) { throw new IntrospectionException("set method does not have exactly one parameter"); } if(getMethod != null && setMethod != null) { if(!getMethod.getReturnType().equals(setMethod.getParameterTypes()[0])) { throw new IntrospectionException("set and get methods do not share the same type"); } if(!getMethod.getDeclaringClass().isAssignableFrom(setMethod.getDeclaringClass()) && !setMethod.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass())) { throw new IntrospectionException("set and get methods are not in the same class."); } } if(getIndex != null && (getIndex.getParameterTypes().length != 1 || !(getIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("get index method has wrong parameters"); } if(setIndex != null && (setIndex.getParameterTypes().length != 2 || !(setIndex.getParameterTypes()[0]).equals(java.lang.Integer.TYPE))) { throw new IntrospectionException("set index method has wrong parameters"); } if(getIndex != null && setIndex != null) { if(!getIndex.getReturnType().equals(setIndex.getParameterTypes()[1])) { throw new IntrospectionException("set index methods do not share the same type"); } if(!getIndex.getDeclaringClass().isAssignableFrom(setIndex.getDeclaringClass()) && !setIndex.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("get and set index methods are not in the same class."); } } if(getIndex != null && getMethod != null && !getIndex.getDeclaringClass().isAssignableFrom(getMethod.getDeclaringClass()) && !getMethod.getDeclaringClass().isAssignableFrom(getIndex.getDeclaringClass())) { throw new IntrospectionException("methods are not in the same class."); } if(getIndex != null && getMethod != null && !Array.newInstance(getIndex.getReturnType(),0).getClass().equals(getMethod.getReturnType())) { throw new IntrospectionException("array methods do not match index methods."); } this.getMethod = getMethod; this.setMethod = setMethod; this.getIndex = getIndex; this.setIndex = setIndex; this.indexedPropertyType = getIndex != null ? getIndex.getReturnType() : setIndex.getParameterTypes()[1]; this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass()); }
| 15,968
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { this(); // bind/listen socket bind(new InetSocketAddress(bindAddr, port), backlog); }
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { this(); // bind/listen socket bind(new InetSocketAddress(bindAddr, port), backlog); }
| 15,969
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { this(); // bind/listen socket bind(new InetSocketAddress(bindAddr, port), backlog); }
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { if (impl == null) throw new NullPointerException("impl may not be null"); // bind/listen socket bind(new InetSocketAddress(bindAddr, port), backlog); }
| 15,970
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { this(); // bind/listen socket bind(new InetSocketAddress(bindAddr, port), backlog); }
|
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { this(); // bind/listen socket this.impl = impl; this.impl.create(true); }
| 15,971
|
private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); debug("start Certificate len == " + cert.getLength()); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) { throw new IOException("malformed Certificate"); } // TBSCertificate ::= SEQUENCE { DERValue tbsCert = der.read(); if (tbsCert.getValue() != DER.CONSTRUCTED_VALUE) { throw new IOException("malformed TBSCertificate"); } tbsCertBytes = tbsCert.getEncoded(); debug("start TBSCertificate len == " + tbsCert.getLength()); // Version ::= INTEGER [0] { v1(0), v2(1), v3(2) } DERValue val = der.read(); if (val.getTagClass() == DER.CONTEXT && val.getTag() == 0) { version = ((BigInteger) der.read().getValue()).intValue() + 1; val = der.read(); } else { version = 1; } debug("read version == " + version); // SerialNumber ::= INTEGER serialNo = (BigInteger) val.getValue(); debug("read serial number == " + serialNo); // AlgorithmIdentifier ::= SEQUENCE { val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); } int certAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + certAlgLen); val = der.read(); // algorithm OBJECT IDENTIFIER, algId = (OID) val.getValue(); debug("read algorithm ID == " + algId); // parameters ANY DEFINED BY algorithm OPTIONAL } if (certAlgLen > val.getEncodedLength()) { val = der.read(); if (val == null) { algVal = null; } else { algVal = val.getEncoded(); } if (val.isConstructed()) { encoded.skip(val.getLength()); } debug("read algorithm parameters == " + algVal); } // issuer Name, val = der.read(); issuer = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read issuer == " + issuer); // Validity ::= SEQUENCE { // notBefore Time, // notAfter Time } if (!der.read().isConstructed()) { throw new IOException("malformed Validity"); } notBefore = (Date) der.read().getValue(); notAfter = (Date) der.read().getValue(); debug("read notBefore == " + notBefore); debug("read notAfter == " + notAfter); // subject Name, val = der.read(); subject = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read subject == " + subject); // SubjectPublicKeyInfo ::= SEQUENCE { // algorithm AlgorithmIdentifier, // subjectPublicKey BIT STRING } DERValue spki = der.read(); if (!spki.isConstructed()) { throw new IOException("malformed SubjectPublicKeyInfo"); } KeyFactory spkFac = KeyFactory.getInstance("X.509"); subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded())); der.skip(spki.getLength()); debug("read subjectPublicKey == " + subjectKey); if (version > 1) { val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 1) { byte[] b = (byte[]) val.getValue(); issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read issuerUniqueId == " + issuerUniqueId); val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2) { byte[] b = (byte[]) val.getValue(); subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read subjectUniqueId == " + subjectUniqueId); val = der.read(); } if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3) { val = der.read(); debug("start Extensions len == " + val.getLength()); int len = 0; while (len < val.getLength()) { DERValue ext = der.read(); debug("start extension len == " + ext.getLength()); Extension e = new Extension(ext.getEncoded()); extensions.put(e.getOid(), e); der.skip(ext.getLength()); len += ext.getEncodedLength(); debug("count == " + len); } } val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); } int sigAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + sigAlgLen); val = der.read(); sigAlgId = (OID) val.getValue(); debug("read algorithm id == " + sigAlgId); if (sigAlgLen > val.getEncodedLength()) { val = der.read(); if (val.getValue() == null) { if (subjectKey instanceof DSAPublicKey) { AlgorithmParameters params = AlgorithmParameters.getInstance("DSA"); DSAParams dsap = ((DSAPublicKey) subjectKey).getParams(); DSAParameterSpec spec = new DSAParameterSpec(dsap.getP(), dsap.getQ(), dsap.getG()); params.init(spec); sigAlgVal = params.getEncoded(); } } else { sigAlgVal = (byte[]) val.getEncoded(); } if (val.isConstructed()) { encoded.skip(val.getLength()); } debug("read parameters == " + sigAlgVal); } signature = ((BitString) der.read().getValue()).toByteArray(); debug("read signature ==\n" + Util.hexDump(signature, ">>>> ")); }
|
private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); debug("start Certificate len == " + cert.getLength()); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) { throw new IOException("malformed Certificate"); // TBSCertificate ::= SEQUENCE { DERValue tbsCert = der.read(); if (tbsCert.getValue() != DER.CONSTRUCTED_VALUE) { throw new IOException("malformed TBSCertificate"); tbsCertBytes = tbsCert.getEncoded(); debug("start TBSCertificate len == " + tbsCert.getLength()); // Version ::= INTEGER [0] { v1(0), v2(1), v3(2) DERValue val = der.read(); if (val.getTagClass() == DER.CONTEXT && val.getTag() == 0) { version = ((BigInteger) der.read().getValue()).intValue() + 1; val = der.read(); else { version = 1; debug("read version == " + version); // SerialNumber ::= INTEGER serialNo = (BigInteger) val.getValue(); debug("read serial number == " + serialNo); // AlgorithmIdentifier ::= SEQUENCE { val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); int certAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + certAlgLen); val = der.read(); // algorithm OBJECT IDENTIFIER, algId = (OID) val.getValue(); debug("read algorithm ID == " + algId); // parameters ANY DEFINED BY algorithm OPTIONAL if (certAlgLen > val.getEncodedLength()) { val = der.read(); if (val == null) { algVal = null; else { algVal = val.getEncoded(); if (val.isConstructed()) { encoded.skip(val.getLength()); debug("read algorithm parameters == " + algVal); // issuer Name, val = der.read(); issuer = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read issuer == " + issuer); // Validity ::= SEQUENCE { // notBefore Time, // notAfter Time if (!der.read().isConstructed()) { throw new IOException("malformed Validity"); notBefore = (Date) der.read().getValue(); notAfter = (Date) der.read().getValue(); debug("read notBefore == " + notBefore); debug("read notAfter == " + notAfter); // subject Name, val = der.read(); subject = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read subject == " + subject); // SubjectPublicKeyInfo ::= SEQUENCE { // algorithm AlgorithmIdentifier, // subjectPublicKey BIT STRING DERValue spki = der.read(); if (!spki.isConstructed()) { throw new IOException("malformed SubjectPublicKeyInfo"); KeyFactory spkFac = KeyFactory.getInstance("X.509"); subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded())); der.skip(spki.getLength()); debug("read subjectPublicKey == " + subjectKey); if (version > 1) { val = der.read(); if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 1) { byte[] b = (byte[]) val.getValue(); issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read issuerUniqueId == " + issuerUniqueId); val = der.read(); if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2) { byte[] b = (byte[]) val.getValue(); subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read subjectUniqueId == " + subjectUniqueId); val = der.read(); if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3) { val = der.read(); debug("start Extensions len == " + val.getLength()); int len = 0; while (len < val.getLength()) { DERValue ext = der.read(); debug("start extension len == " + ext.getLength()); Extension e = new Extension(ext.getEncoded()); extensions.put(e.getOid(), e); der.skip(ext.getLength()); len += ext.getEncodedLength(); debug("count == " + len); val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); int sigAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + sigAlgLen); val = der.read(); sigAlgId = (OID) val.getValue(); debug("read algorithm id == " + sigAlgId); if (sigAlgLen > val.getEncodedLength()) { val = der.read(); if (val.getValue() == null) { if (subjectKey instanceof DSAPublicKey) { AlgorithmParameters params = AlgorithmParameters.getInstance("DSA"); DSAParams dsap = ((DSAPublicKey) subjectKey).getParams(); DSAParameterSpec spec = new DSAParameterSpec(dsap.getP(), dsap.getQ(), dsap.getG()); params.init(spec); sigAlgVal = params.getEncoded(); else { sigAlgVal = (byte[]) val.getEncoded(); if (val.isConstructed()) { encoded.skip(val.getLength()); debug("read parameters == " + sigAlgVal); signature = ((BitString) der.read().getValue()).toByteArray(); debug("read signature ==\n" + Util.hexDump(signature, ">>>> ")); }
| 15,972
|
private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); debug("start Certificate len == " + cert.getLength()); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) { throw new IOException("malformed Certificate"); } // TBSCertificate ::= SEQUENCE { DERValue tbsCert = der.read(); if (tbsCert.getValue() != DER.CONSTRUCTED_VALUE) { throw new IOException("malformed TBSCertificate"); } tbsCertBytes = tbsCert.getEncoded(); debug("start TBSCertificate len == " + tbsCert.getLength()); // Version ::= INTEGER [0] { v1(0), v2(1), v3(2) } DERValue val = der.read(); if (val.getTagClass() == DER.CONTEXT && val.getTag() == 0) { version = ((BigInteger) der.read().getValue()).intValue() + 1; val = der.read(); } else { version = 1; } debug("read version == " + version); // SerialNumber ::= INTEGER serialNo = (BigInteger) val.getValue(); debug("read serial number == " + serialNo); // AlgorithmIdentifier ::= SEQUENCE { val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); } int certAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + certAlgLen); val = der.read(); // algorithm OBJECT IDENTIFIER, algId = (OID) val.getValue(); debug("read algorithm ID == " + algId); // parameters ANY DEFINED BY algorithm OPTIONAL } if (certAlgLen > val.getEncodedLength()) { val = der.read(); if (val == null) { algVal = null; } else { algVal = val.getEncoded(); } if (val.isConstructed()) { encoded.skip(val.getLength()); } debug("read algorithm parameters == " + algVal); } // issuer Name, val = der.read(); issuer = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read issuer == " + issuer); // Validity ::= SEQUENCE { // notBefore Time, // notAfter Time } if (!der.read().isConstructed()) { throw new IOException("malformed Validity"); } notBefore = (Date) der.read().getValue(); notAfter = (Date) der.read().getValue(); debug("read notBefore == " + notBefore); debug("read notAfter == " + notAfter); // subject Name, val = der.read(); subject = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read subject == " + subject); // SubjectPublicKeyInfo ::= SEQUENCE { // algorithm AlgorithmIdentifier, // subjectPublicKey BIT STRING } DERValue spki = der.read(); if (!spki.isConstructed()) { throw new IOException("malformed SubjectPublicKeyInfo"); } KeyFactory spkFac = KeyFactory.getInstance("X.509"); subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded())); der.skip(spki.getLength()); debug("read subjectPublicKey == " + subjectKey); if (version > 1) { val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 1) { byte[] b = (byte[]) val.getValue(); issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read issuerUniqueId == " + issuerUniqueId); val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2) { byte[] b = (byte[]) val.getValue(); subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read subjectUniqueId == " + subjectUniqueId); val = der.read(); } if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3) { val = der.read(); debug("start Extensions len == " + val.getLength()); int len = 0; while (len < val.getLength()) { DERValue ext = der.read(); debug("start extension len == " + ext.getLength()); Extension e = new Extension(ext.getEncoded()); extensions.put(e.getOid(), e); der.skip(ext.getLength()); len += ext.getEncodedLength(); debug("count == " + len); } } val = der.read(); if (!val.isConstructed()) { throw new IOException("malformed AlgorithmIdentifier"); } int sigAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + sigAlgLen); val = der.read(); sigAlgId = (OID) val.getValue(); debug("read algorithm id == " + sigAlgId); if (sigAlgLen > val.getEncodedLength()) { val = der.read(); if (val.getValue() == null) { if (subjectKey instanceof DSAPublicKey) { AlgorithmParameters params = AlgorithmParameters.getInstance("DSA"); DSAParams dsap = ((DSAPublicKey) subjectKey).getParams(); DSAParameterSpec spec = new DSAParameterSpec(dsap.getP(), dsap.getQ(), dsap.getG()); params.init(spec); sigAlgVal = params.getEncoded(); } } else { sigAlgVal = (byte[]) val.getEncoded(); } if (val.isConstructed()) { encoded.skip(val.getLength()); } debug("read parameters == " + sigAlgVal); } signature = ((BitString) der.read().getValue()).toByteArray(); debug("read signature ==\n" + Util.hexDump(signature, ">>>> ")); }
|
private void parse(InputStream encoded) throws Exception DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE DERValue cert = der.read(); debug("start Certificate len == " + cert.getLength()); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new IOException("malformed Certificate"); } // TBSCertificate ::= SEQUENCE DERValue tbsCert = der.read(); if (tbsCert.getValue() != DER.CONSTRUCTED_VALUE) throw new IOException("malformed TBSCertificate"); } tbsCertBytes = tbsCert.getEncoded(); debug("start TBSCertificate len == " + tbsCert.getLength()); // Version ::= INTEGER [0] v1(0), v2(1), v3(2) } DERValue val = der.read(); if (val.getTagClass() == DER.CONTEXT && val.getTag() == 0) version = ((BigInteger) der.read().getValue()).intValue() + 1; val = der.read(); } else version = 1; } debug("read version == " + version); // SerialNumber ::= INTEGER serialNo = (BigInteger) val.getValue(); debug("read serial number == " + serialNo); // AlgorithmIdentifier ::= SEQUENCE val = der.read(); if (!val.isConstructed()) throw new IOException("malformed AlgorithmIdentifier"); } int certAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + certAlgLen); val = der.read(); // algorithm OBJECT IDENTIFIER, algId = (OID) val.getValue(); debug("read algorithm ID == " + algId); // parameters ANY DEFINED BY algorithm OPTIONAL } if (certAlgLen > val.getEncodedLength()) val = der.read(); if (val == null) algVal = null; } else algVal = val.getEncoded(); } if (val.isConstructed()) encoded.skip(val.getLength()); } debug("read algorithm parameters == " + algVal); } // issuer Name, val = der.read(); issuer = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read issuer == " + issuer); // Validity ::= SEQUENCE // notBefore Time, // notAfter Time } if (!der.read().isConstructed()) throw new IOException("malformed Validity"); } notBefore = (Date) der.read().getValue(); notAfter = (Date) der.read().getValue(); debug("read notBefore == " + notBefore); debug("read notAfter == " + notAfter); // subject Name, val = der.read(); subject = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read subject == " + subject); // SubjectPublicKeyInfo ::= SEQUENCE // algorithm AlgorithmIdentifier, // subjectPublicKey BIT STRING } DERValue spki = der.read(); if (!spki.isConstructed()) throw new IOException("malformed SubjectPublicKeyInfo"); } KeyFactory spkFac = KeyFactory.getInstance("X.509"); subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded())); der.skip(spki.getLength()); debug("read subjectPublicKey == " + subjectKey); if (version > 1) val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 1) byte[] b = (byte[]) val.getValue(); issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read issuerUniqueId == " + issuerUniqueId); val = der.read(); } if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2) byte[] b = (byte[]) val.getValue(); subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF); debug("read subjectUniqueId == " + subjectUniqueId); val = der.read(); } if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3) val = der.read(); debug("start Extensions len == " + val.getLength()); int len = 0; while (len < val.getLength()) DERValue ext = der.read(); debug("start extension len == " + ext.getLength()); Extension e = new Extension(ext.getEncoded()); extensions.put(e.getOid(), e); der.skip(ext.getLength()); len += ext.getEncodedLength(); debug("count == " + len); } } val = der.read(); if (!val.isConstructed()) throw new IOException("malformed AlgorithmIdentifier"); } int sigAlgLen = val.getLength(); debug("start AlgorithmIdentifier len == " + sigAlgLen); val = der.read(); sigAlgId = (OID) val.getValue(); debug("read algorithm id == " + sigAlgId); if (sigAlgLen > val.getEncodedLength()) val = der.read(); if (val.getValue() == null) if (subjectKey instanceof DSAPublicKey) AlgorithmParameters params = AlgorithmParameters.getInstance("DSA"); DSAParams dsap = ((DSAPublicKey) subjectKey).getParams(); DSAParameterSpec spec = new DSAParameterSpec(dsap.getP(), dsap.getQ(), dsap.getG()); params.init(spec); sigAlgVal = params.getEncoded(); } } else sigAlgVal = (byte[]) val.getEncoded(); } if (val.isConstructed()) encoded.skip(val.getLength()); } debug("read parameters == " + sigAlgVal); } signature = ((BitString) der.read().getValue()).toByteArray(); debug("read signature ==\n" + Util.hexDump(signature, ">>>> ")); }
| 15,973
|
public final void update(byte[]data) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, 0, data.length); else throw new SignatureException(); }
|
public final void update(byte b) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, 0, data.length); else throw new SignatureException(); }
| 15,974
|
public final void update(byte[]data) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(data, 0, data.length); else throw new SignatureException(); }
|
public final void update(byte[]data) throws SignatureException { if (state != UNINITIALIZED) engineUpdate(b); else throw new SignatureException(); }
| 15,975
|
public Set getCriticalExtensionOIDs();
|
public Set getCriticalExtensionOIDs();
| 15,976
|
public byte[] getExtensionValue(String oid);
|
public byte[] getExtensionValue(String oid);
| 15,977
|
public X500Principal(byte[] encoded) { try { name = new X500DistinguishedName(encoded); } catch (IOException ioe) { throw new IllegalArgumentException(ioe.toString()); } }
|
public X500Principal(String name) { try { name = new X500DistinguishedName(encoded); } catch (IOException ioe) { throw new IllegalArgumentException(ioe.toString()); } }
| 15,978
|
public X500Principal(byte[] encoded) { try { name = new X500DistinguishedName(encoded); } catch (IOException ioe) { throw new IllegalArgumentException(ioe.toString()); } }
|
public X500Principal(byte[] encoded) { try { name = new X500DistinguishedName(encoded); } catch (IOException ioe) { throw new IllegalArgumentException(ioe.toString()); } }
| 15,979
|
public Set getNonCriticalExtensionOIDs();
|
public Set getNonCriticalExtensionOIDs();
| 15,980
|
public boolean hasUnsupportedCriticalExtension();
|
public boolean hasUnsupportedCriticalExtension();
| 15,981
|
public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); }
|
public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException e) { } throw new NoSuchAlgorithmException(algorithm); }
| 15,982
|
public static AlgorithmParameters getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); }
|
public static AlgorithmParameters getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException e) { } throw new NoSuchAlgorithmException(algorithm); }
| 15,983
|
CollationElement(String char_seq, int primary, short secondary, short tertiary){ this.char_seq = char_seq; this.primary = primary; this.secondary = secondary; this.tertiary = tertiary;}
|
CollationElement(String char_seq, int primary, short secondary, short tertiary){ this.char_seq = char_seq; this.primary = primary; this.secondary = secondary; this.tertiary = tertiary;}
| 15,984
|
CollationElement(String char_seq, int primary, short secondary, short tertiary){ this.char_seq = char_seq; this.primary = primary; this.secondary = secondary; this.tertiary = tertiary;}
|
CollationElement(String char_seq, int primary, short secondary, short tertiary){ this.char_seq = char_seq; this.primary = primary; this.secondary = secondary; this.tertiary = tertiary;}
| 15,985
|
RuleBasedCollator(String rules) throws ParseException{ this.rules = rules; if (rules.equals("")) throw new IllegalArgumentException("Empty rule set"); Vector v = new Vector(); boolean ignore_chars = true; int primary_seq = 0; short secondary_seq = 0; short tertiary_seq = 0; StringBuffer sb = new StringBuffer(""); for (int i = 0; i < rules.length(); i++) { char c = rules.charAt(i); // Check if it is a whitespace character if (((c >= 0x09) && (c <= 0x0D)) || (c == 0x20)) continue; // Primary difference if (c == '<') { ignore_chars = false; secondary_seq = 0; tertiary_seq = 0; ++primary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Secondary difference if (c == ';') { if (primary_seq == 0) throw new ParseException(rules, i); ++secondary_seq; tertiary_seq = 0; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Tertiary difference if (c == ',') { if (primary_seq == 0) throw new ParseException(rules, i); ++tertiary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Is equal to if (c == '=') { if (primary_seq == 0) throw new ParseException(rules, i); CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Sort accents backwards if (c == '@') { throw new ParseException("French style accents not implemented yet", 0); } // Reset command if (c == '&') { throw new ParseException("Reset not implemented yet", 0); } // See if we are still reading characters to skip if (ignore_chars == true) { CollationElement e = new CollationElement(c + "", 0, (short)0, (short)0); v.add(e); continue; } sb.append(c); } ce_table = v.toArray();}
|
RuleBasedCollator(String rules) throws ParseException{ this.rules = rules; if (rules.equals("")) throw new IllegalArgumentException("Empty rule set"); Vector v = new Vector(); boolean ignore_chars = true; int primary_seq = 0; short secondary_seq = 0; short tertiary_seq = 0; StringBuffer sb = new StringBuffer(""); for (int i = 0; i < rules.length(); i++) { char c = rules.charAt(i); // Check if it is a whitespace character if (((c >= 0x09) && (c <= 0x0D)) || (c == 0x20)) continue; // Primary difference if (c == '<') { ignore_chars = false; secondary_seq = 0; tertiary_seq = 0; ++primary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Secondary difference if (c == ';') { if (primary_seq == 0) throw new ParseException(rules, i); ++secondary_seq; tertiary_seq = 0; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Tertiary difference if (c == ',') { if (primary_seq == 0) throw new ParseException(rules, i); ++tertiary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Is equal to if (c == '=') { if (primary_seq == 0) throw new ParseException(rules, i); CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Sort accents backwards if (c == '@') { throw new ParseException("French style accents not implemented yet", 0); } // Reset command if (c == '&') { throw new ParseException("Reset not implemented yet", 0); } // See if we are still reading characters to skip if (ignore_chars == true) { CollationElement e = new CollationElement(c + "", 0, (short)0, (short)0); v.add(e); continue; } sb.append(c); } ce_table = v.toArray();}
| 15,986
|
RuleBasedCollator(String rules) throws ParseException{ this.rules = rules; if (rules.equals("")) throw new IllegalArgumentException("Empty rule set"); Vector v = new Vector(); boolean ignore_chars = true; int primary_seq = 0; short secondary_seq = 0; short tertiary_seq = 0; StringBuffer sb = new StringBuffer(""); for (int i = 0; i < rules.length(); i++) { char c = rules.charAt(i); // Check if it is a whitespace character if (((c >= 0x09) && (c <= 0x0D)) || (c == 0x20)) continue; // Primary difference if (c == '<') { ignore_chars = false; secondary_seq = 0; tertiary_seq = 0; ++primary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Secondary difference if (c == ';') { if (primary_seq == 0) throw new ParseException(rules, i); ++secondary_seq; tertiary_seq = 0; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Tertiary difference if (c == ',') { if (primary_seq == 0) throw new ParseException(rules, i); ++tertiary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Is equal to if (c == '=') { if (primary_seq == 0) throw new ParseException(rules, i); CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Sort accents backwards if (c == '@') { throw new ParseException("French style accents not implemented yet", 0); } // Reset command if (c == '&') { throw new ParseException("Reset not implemented yet", 0); } // See if we are still reading characters to skip if (ignore_chars == true) { CollationElement e = new CollationElement(c + "", 0, (short)0, (short)0); v.add(e); continue; } sb.append(c); } ce_table = v.toArray();}
|
RuleBasedCollator(String rules) throws ParseException{ this.rules = rules; if (rules.equals("")) throw new IllegalArgumentException("Empty rule set"); Vector v = new Vector(); boolean ignore_chars = true; int primary_seq = 0; short secondary_seq = 0; short tertiary_seq = 0; StringBuffer sb = new StringBuffer(""); for (int i = 0; i < rules.length(); i++) { char c = rules.charAt(i); // Check if it is a whitespace character if (((c >= 0x09) && (c <= 0x0D)) || (c == 0x20)) continue; // Primary difference if (c == '<') { ignore_chars = false; secondary_seq = 0; tertiary_seq = 0; ++primary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Secondary difference if (c == ';') { if (primary_seq == 0) throw new ParseException(rules, i); ++secondary_seq; tertiary_seq = 0; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Tertiary difference if (c == ',') { if (primary_seq == 0) throw new ParseException(rules, i); ++tertiary_seq; CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Is equal to if (c == '=') { if (primary_seq == 0) throw new ParseException(rules, i); CollationElement e = new CollationElement(sb.toString(), primary_seq, secondary_seq, tertiary_seq); v.add(e); sb.setLength(0); continue; } // Sort accents backwards if (c == '@') { throw new ParseException("French style accents not implemented yet", 0); } // Reset command if (c == '&') { throw new ParseException("Reset not implemented yet", 0); } // See if we are still reading characters to skip if (ignore_chars == true) { CollationElement e = new CollationElement(c + "", 0, (short)0, (short)0); v.add(e); continue; } sb.append(c); } ce_table = v.toArray();}
| 15,987
|
clone(){ return super.clone();}
|
clone(){ return super.clone();}
| 15,988
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 15,989
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 15,990
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 15,991
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 15,992
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return -1; else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return -1; else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return -1; else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return -1; else if (tert1 > tert2) return(1); }}
| 15,993
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return 1; // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return 1; else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return 1; else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return 1; }}
| 15,994
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return -1; else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return -1; else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return -1; else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return -1; else if (tert1 > tert2) return(1); }}
| 15,995
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return 1; // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return 1; else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return 1; else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return 1; }}
| 15,996
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord2); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 15,997
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return -1; else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return -1; else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return -1; else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return -1; else if (tert1 > tert2) return(1); }}
| 15,998
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return 1; else if (getStrength() == TERTIARY) continue; return ord1block.key.compareTo(ord2block.key); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return 1; else if (getStrength() == TERTIARY) continue; return ord1block.key.compareTo(ord2block.key); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return 1; else if (getStrength() == TERTIARY) continue; return ord1block.key.compareTo(ord2block.key); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return 1; else if (getStrength() == TERTIARY) continue; return ord1block.key.compareTo(ord2block.key); }}
| 15,999
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
|
compare(String s1, String s2){ CollationElementIterator cei1 = getCollationElementIterator(s1); CollationElementIterator cei2 = getCollationElementIterator(s2); for(;;) { int ord1 = cei1.next(); int ord2 = cei2.next(); // Check for end of string if (ord1 == CollationElementIterator.NULLORDER) if (ord2 == CollationElementIterator.NULLORDER) return(0); else return(-1); else if (ord2 == CollationElementIterator.NULLORDER) return(1); // We know chars are totally equal, so skip if (ord1 == ord2) continue; // Check for primary strength differences int prim1 = CollationElementIterator.primaryOrder(ord1); int prim2 = CollationElementIterator.primaryOrder(ord2); if (prim1 < prim2) return(-1); else if (prim1 > prim2) return(1); else if (getStrength() == PRIMARY) continue; // Check for secondary strength differences int sec1 = CollationElementIterator.secondaryOrder(ord1); int sec2 = CollationElementIterator.secondaryOrder(ord2); if (sec1 < sec2) return(-1); else if (sec1 > sec2) return(1); else if (getStrength() == SECONDARY) continue; // Check for tertiary differences int tert1 = CollationElementIterator.tertiaryOrder(ord1); int tert2 = CollationElementIterator.tertiaryOrder(ord1); if (tert1 < tert2) return(-1); else if (tert1 > tert2) return(1); }}
| 16,000
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
| 16,001
|
getCollationElementIterator(String str){ return(new CollationElementIterator(this, str));}
|
getCollationElementIterator(String str){ return(new CollationElementIterator(this, str));}
| 16,002
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
| 16,003
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.primaryOrder(ord) << 8; ord |= CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
| 16,004
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < objarr.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
| 16,005
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
| 16,006
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
|
getCollationKey(String str){ CollationElementIterator cei = getCollationElementIterator(str); Vector vect = new Vector(25); int ord = cei.next(); while (ord != CollationElementIterator.NULLORDER) { switch (getStrength()) { case PRIMARY: ord = CollationElementIterator.primaryOrder(ord); break; case SECONDARY: ord = CollationElementIterator.secondaryOrder(ord); default: break; } vect.add(new Integer(ord)); } Object[] objarr = vect.toArray(); byte[] key = new byte[objarr.length * 4]; for (int i = 0; i < key.length; i++) { int j = ((Integer)objarr[i]).intValue(); key[i++] = (byte)((j & 0xFF000000) >> 24); key[i++] = (byte)((j & 0x00FF0000) >> 16); key[i++] = (byte)((j & 0x0000FF00) >> 8); key[i++] = (byte)(j & 0x000000FF); } return(new CollationKey(this, str, key));}
| 16,007
|
getRules(){ return(rules);}
|
getRules(){ return(rules);}
| 16,008
|
hashCode(){ return(System.identityHashCode(this));}
|
hashCode(){ return(System.identityHashCode(this));}
| 16,009
|
public static final int primaryOrder (int order){ // From the JDK 1.2 spec. return order >>> 16;}
|
public static final int primaryOrder (int order){ // From the JDK 1.2 spec. return order >>> 16;}
| 16,010
|
public static final int primaryOrder (int order){ // From the JDK 1.2 spec. return order >>> 16;}
|
public static final int primaryOrder (int order){ // From the JDK 1.2 spec. return order >>> 16;}
| 16,011
|
public static final short secondaryOrder (int order){ // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255);}
|
public static final short secondaryOrder (int order){ // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255);}
| 16,012
|
public static final short secondaryOrder (int order){ // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255);}
|
public static final short secondaryOrder (int order){ // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255);}
| 16,013
|
public static final short tertiaryOrder (int order){ // From the JDK 1.2 spec. return (short) (order & 255);}
|
public static final short tertiaryOrder (int order){ // From the JDK 1.2 spec. return (short) (order & 255);}
| 16,014
|
public static final short tertiaryOrder (int order){ // From the JDK 1.2 spec. return (short) (order & 255);}
|
public static final short tertiaryOrder (int order){ // From the JDK 1.2 spec. return (short) (order & 255);}
| 16,015
|
CollationElementIterator(RuleBasedCollator rbc, String str){ this.rbc = rbc; this.str = str;}
|
CollationElementIterator(RuleBasedCollator rbc, String str){ this.rbc = rbc; this.str = str;}
| 16,016
|
next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
|
next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
| 16,017
|
next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
|
next(){ ++pos; if (pos >= str.length()) return(NULLORDER); String s = str.charAt(pos) + ""; return(rbc.getCollationElementValue(s));}
| 16,018
|
reset(){ pos = 0;}
|
reset(){ pos = 0;}
| 16,019
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;}
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;}
| 16,020
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;}
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.originalText = originalText; this.key = key;}
| 16,021
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;}
|
CollationKey(Collator collator, String str, byte[] key){ this.collator = collator; this.str = str; this.key = key;}
| 16,022
|
ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
|
private ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
| 16,023
|
ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
|
ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
| 16,024
|
ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
|
ActionMap createActionMap() { Action[] actions = textComponent.getActions(); ActionMap am = new ActionMapUIResource(); for (int i = 0; i < actions.length; ++i) { String name = (String) actions[i].getValue(Action.NAME); if (name != null) am.put(name, actions[i]); } return am; }
| 16,025
|
InputMap getInputMap(int condition) { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".focusInputMap"); } }
|
private InputMap getInputMap() { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".focusInputMap"); } }
| 16,027
|
InputMap getInputMap(int condition) { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".focusInputMap"); } }
|
InputMap getInputMap(int condition) { String prefix = getPropertyPrefix(); switch (condition) { case JComponent.WHEN_IN_FOCUSED_WINDOW: // FIXME: is this the right string? nobody seems to use it. return (InputMap) UIManager.get(prefix + ".windowInputMap"); case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT: return (InputMap) UIManager.get(prefix + ".ancestorInputMap"); default: case JComponent.WHEN_FOCUSED: return (InputMap) UIManager.get(prefix + ".focusInputMap"); } }
| 16,028
|
protected void installKeyboardActions() { // This is only there for backwards compatibility. textComponent.setKeymap(createKeymap()); // load any bindings for the newer InputMap / ActionMap interface SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, getInputMap(JComponent.WHEN_FOCUSED)); SwingUtilities.replaceUIActionMap(textComponent, createActionMap()); ActionMap parentActionMap = new ActionMapUIResource(); Action[] actions = textComponent.getActions(); for (int j = 0; j < actions.length; j++) { Action currAction = actions[j]; parentActionMap.put(currAction.getValue(Action.NAME), currAction); } SwingUtilities.replaceUIActionMap(textComponent, parentActionMap); }
|
protected void installKeyboardActions() { // This is only there for backwards compatibility. textComponent.setKeymap(createKeymap()); // load any bindings for the newer InputMap / ActionMap interface SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED, getInputMap(JComponent.WHEN_FOCUSED)); SwingUtilities.replaceUIActionMap(textComponent, createActionMap()); ActionMap parentActionMap = new ActionMapUIResource(); Action[] actions = textComponent.getActions(); for (int j = 0; j < actions.length; j++) { Action currAction = actions[j]; parentActionMap.put(currAction.getValue(Action.NAME), currAction); } SwingUtilities.replaceUIActionMap(textComponent, parentActionMap); }
| 16,029
|
public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); }
|
public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); }
| 16,030
|
public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); }
|
public void repaint(Rectangle r) { repaint((long) 0, (int) r.getX(), (int) r.getY(), (int) r.getWidth(), (int) r.getHeight()); }
| 16,031
|
public void execute( CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) throws Exception { final Runtime rt = Runtime.getRuntime(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Starting gc..."); long start = System.currentTimeMillis(); rt.gc(); GCStatistics stats = Vm.getHeapManager().getStatistics(); Thread.yield(); long end = System.currentTimeMillis(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Time taken : " + (end-start) + "ms"); out.println("Stats : " + stats.toString()); }
|
public void execute( CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) throws Exception { final Runtime rt = Runtime.getRuntime(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Starting gc..."); long start = System.currentTimeMillis(); rt.gc(); GCStatistics stats = Vm.getHeapManager().getStatistics(); Thread.yield(); long end = System.currentTimeMillis(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Time taken : " + (end-start) + "ms"); out.println("Stats : " + stats.toString()); }
| 16,032
|
public void execute( CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) throws Exception { final Runtime rt = Runtime.getRuntime(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Starting gc..."); long start = System.currentTimeMillis(); rt.gc(); GCStatistics stats = Vm.getHeapManager().getStatistics(); Thread.yield(); long end = System.currentTimeMillis(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Time taken : " + (end-start) + "ms"); out.println("Stats : " + stats.toString()); }
|
public void execute( CommandLine cmdLine, InputStream in, PrintStream out, PrintStream err) throws Exception { final Runtime rt = Runtime.getRuntime(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Starting gc..."); long start = System.currentTimeMillis(); rt.gc(); GCStatistics stats = Vm.getHeapManager().getStatistics(); Thread.yield(); long end = System.currentTimeMillis(); out.println("Memory size: " + rt.totalMemory()); out.println("Free memory: " + rt.freeMemory()); out.println("Time taken : " + (end-start) + "ms"); out.println("Stats : " + stats.toString()); }
| 16,033
|
protected AccessibleAbstractButton(AbstractButton component) { super(component); // TODO } // AccessibleAbstractButton()
|
protected AccessibleAbstractButton(AbstractButton component) { super(component); // TODO } // AccessibleAbstractButton()
| 16,034
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.