rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { path.add(0, parent); parent = parent.getParent (); } return (MenuElement[]) path.toArray(); | if (c instanceof JPopupMenu) c = ((JPopupMenu) c).getInvoker(); else c = c.getParent(); | private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... |
MenuElement[] pathArray = new MenuElement[path.size()]; path.toArray(pathArray); return pathArray; } | private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.setDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen. } ... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { int offs = Utilities.getRowStart(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); ... | |
getTextComponent(event).copy(); | JTextComponent target = getTextComponent(event); if (target != null) target.copy(); | public void actionPerformed(ActionEvent event) { getTextComponent(event).copy(); } |
getTextComponent(event).cut(); | JTextComponent target = getTextComponent(event); if (target != null) target.cut(); | public void actionPerformed(ActionEvent event) { getTextComponent(event).cut(); } |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.setDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocatio... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { int offs = Utilities.getRowEnd(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); ... | |
if (t != null) | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); t.replaceSelection("\n"); } | |
if (t != null) | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); t.replaceSelection("\t"); } | |
getTextComponent(event).paste(); | JTextComponent target = getTextComponent(event); if (target != null) target.paste(); | public void actionPerformed(ActionEvent event) { getTextComponent(event).paste(); } |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.setDot(0); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(Ba... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs1 = Utilities.getRowStart(t, c.getDot()); int offs2 = Utilities.getRowEnd(t, c.getDot()); c.setDot(offs2); c.moveDot(offs1);... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); int dot = c.getDot(); try { int wordStart = Utilities.getWordStart(t, dot); if (dot == wordStart) { // Current cursor pos... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.moveDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen. ... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs = Utilities.getRowStart(t, c.getDot()); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); ... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocationE... | |
} | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs = Utilities.getRowEnd(t, c.getDot()); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch... | |
if (root == null) root = new DefaultMutableTreeNode(); setRoot(root); | this (root, false); | public DefaultTreeModel(TreeNode root) { if (root == null) root = new DefaultMutableTreeNode(); setRoot(root); } |
throws JdwpException | public static void resumeAllThreads () { // Our JDWP thread group -- don't resume Thread current = Thread.currentThread (); ThreadGroup jdwpGroup = current.getThreadGroup (); // Find the root ThreadGroup ThreadGroup group = jdwpGroup; ThreadGroup parent = group.getParent (); while (parent != nul... | |
throws JdwpException | public static void suspendAllThreads () { // Our JDWP thread group -- don't suspend any of those threads Thread current = Thread.currentThread (); ThreadGroup jdwpGroup = current.getThreadGroup (); // Find the root ThreadGroup ThreadGroup group = jdwpGroup; ThreadGroup parent = group.getParent (); ... | |
{ | public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | |
} if (!(obj instanceof RSAPublicKey)) { | if (! (obj instanceof RSAPublicKey)) | public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... |
} | public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | |
String ls = SystemProperties.getProperty("line.separator"); | String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); | public String toString() { if (str == null) { String ls = SystemProperties.getProperty("line.separator"); str = new StringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append(")").toString(); } return str; } |
if (file.exists() && !file.isDirectory()) | if (file.exists()) | Resource getResource(String name) { try { File file = new File(dir, name).getCanonicalFile(); if (file.exists() && !file.isDirectory()) return new FileResource(this, file); } catch (IOException e) { // Fall through... } return null; } |
public IllegalMechanismStateException(String detail) | public IllegalMechanismStateException() | public IllegalMechanismStateException(String detail) { super(detail); } |
super(detail); | super(); | public IllegalMechanismStateException(String detail) { super(detail); } |
updateTimerStatus(); | public void focusGained(FocusEvent event) { setVisible(true); } | |
if (blinkTimer != null && blinkTimer.isRunning()) blinkTimer.stop(); } | public void focusLost(FocusEvent event) { if (event.isTemporary() == false) setVisible(false); } | |
if (visible) if (textComponent.isEnabled() && textComponent.isEditable()) { if (blinkTimer == null) initBlinkTimer(); blinkTimer.start(); } else { if (blinkTimer != null) blinkTimer.stop(); } | updateTimerStatus(); | public void setVisible(boolean v) { if (v != visible) { visible = v; if (visible) if (textComponent.isEnabled() && textComponent.isEditable()) { if (blinkTimer == null) initBlinkTimer(); blinkTimer.start(); } else ... |
this.refCount = 0; | protected final synchronized int decRefCount(boolean forceClose) { refCount--; if ((refCount == 0) || forceClose) { onClose(); if (keyboardHandler != null) { this.keyboardHandler.close(); } if (mouseHandler != null) { this.mouseHandler.close(); } if (graphics != null) { this.graphics.close(); ... | |
this.refCount = rc; | protected final int incRefCount() { final boolean initialize; final int rc; synchronized (this) { refCount++; rc = refCount; initialize = (refCount == 1); } if (initialize) { final JNodeFrameBufferDevice dev = (JNodeFrameBufferDevice) GraphicsEnvironment .getLocalGraphicsEnvironment().getDefaultScreen... | |
protected void finalize() | protected void finalize() throws Throwable | protected void finalize() { queue.setNullOnEmpty(true); } |
critOids = new HashSet(); nonCritOids = new HashSet(); | public X509Certificate(InputStream encoded) throws CertificateException, IOException { super(); extensions = new HashMap(); critOids = new HashSet(); nonCritOids = new HashSet(); try { parse(encoded); } catch (IOException ioe) { throw ioe; } catch (Exception ... | |
throw new CertificateException(e.toString()); | debug(e); CertificateException ce = new CertificateException(e.getMessage()); ce.initCause (e); throw ce; | public X509Certificate(InputStream encoded) throws CertificateException, IOException { super(); extensions = new HashMap(); critOids = new HashSet(); nonCritOids = new HashSet(); try { parse(encoded); } catch (IOException ioe) { throw ioe; } catch (Exception ... |
throw new CertificateException("signature not validated"); | { throw new CertificateException("signature not validated"); } | private void doVerify(Signature sig, PublicKey key) throws CertificateException, InvalidKeyException, SignatureException { sig.initVerify(key); sig.update(tbsCertBytes); if (!sig.verify(signature)) throw new CertificateException("signature not validated"); } |
return basicConstraints; | Extension e = getExtension(BasicConstraints.ID); if (e != null) { return ((BasicConstraints) e.getValue()).getPathLengthConstraint(); } return -1; | public int getBasicConstraints() { return basicConstraints; } |
byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try | Extension e = getExtension(ExtendedKeyUsage.ID); if (e != null) | public List getExtendedKeyUsage() throws CertificateParsingException { byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try { DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read... |
DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read(); if (!seq.isConstructed()) throw new CertificateParsingException(); int len = 0; while (len < seq.getLength()) | List a = ((ExtendedKeyUsage) e.getValue()).getPurposeIds(); List b = new ArrayList(a.size()); for (Iterator it = a.iterator(); it.hasNext(); ) | public List getExtendedKeyUsage() throws CertificateParsingException { byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try { DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read... |
DERValue oid = der.read(); if (!(oid.getValue() instanceof OID)) throw new CertificateParsingException(); usages.add(oid.getValue().toString()); len += DERWriter.definiteEncodingSize(oid.getLength()) + oid.getLength() + 1; } | b.add(it.next().toString()); | public List getExtendedKeyUsage() throws CertificateParsingException { byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try { DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read... |
catch (IOException ioe) { throw new CertificateParsingException(); | return Collections.unmodifiableList(b); | public List getExtendedKeyUsage() throws CertificateParsingException { byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try { DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read... |
return usages; | return null; | public List getExtendedKeyUsage() throws CertificateParsingException { byte[] ext = (byte[]) extensions.get("2.5.29.37"); if (ext == null) return null; LinkedList usages = new LinkedList(); try { DERReader der = new DERReader(new ByteArrayInputStream(ext)); DERValue seq = der.read... |
byte[] ext = getExtensionValue("2.5.29.18"); if (ext == null) | Extension e = getExtension(IssuerAlternativeNames.ID); if (e != null) { return ((IssuerAlternativeNames) e.getValue()).getNames(); } | public Collection getIssuerAlternativeNames() throws CertificateParsingException { byte[] ext = getExtensionValue("2.5.29.18"); if (ext == null) return null; return getAltNames(ext); } |
return getAltNames(ext); | public Collection getIssuerAlternativeNames() throws CertificateParsingException { byte[] ext = getExtensionValue("2.5.29.18"); if (ext == null) return null; return getAltNames(ext); } | |
return getIssuerX500Principal(); | return issuer; | public Principal getIssuerDN() { return getIssuerX500Principal(); } |
} | public boolean[] getIssuerUniqueID() { if (issuerUniqueId != null) return issuerUniqueId.toBooleanArray(); return null; } | |
return issuer; | return new X500Principal(issuer.getDer()); | public X500Principal getIssuerX500Principal() { return issuer; } |
if (keyUsage != null) return keyUsage.toBooleanArray(); | Extension e = getExtension(KeyUsage.ID); if (e != null) { KeyUsage ku = (KeyUsage) e.getValue(); boolean[] result = new boolean[9]; boolean[] b = ku.getKeyUsage().toBooleanArray(); System.arraycopy(b, 0, result, 0, b.length); return result; } | public boolean[] getKeyUsage() { if (keyUsage != null) return keyUsage.toBooleanArray(); return null; } |
if (sigAlgId.equals(ID_RSA_WITH_MD2 )) | } if (sigAlgId.equals(ID_RSA_WITH_MD2)) { | public String getSigAlgName() { if (sigAlgId.equals(ID_DSA_WITH_SHA1)) return "SHA1withDSA"; if (sigAlgId.equals(ID_RSA_WITH_MD2 )) return "MD2withRSA"; if (sigAlgId.equals(ID_RSA_WITH_MD5 )) return "MD5withRSA"; if (sigAlgId.equals(ID_RSA_WITH_SHA1 )) return "SHA1withRSA"; return ... |
if (sigAlgId.equals(ID_RSA_WITH_MD5 )) | } if (sigAlgId.equals(ID_RSA_WITH_MD5)) { | public String getSigAlgName() { if (sigAlgId.equals(ID_DSA_WITH_SHA1)) return "SHA1withDSA"; if (sigAlgId.equals(ID_RSA_WITH_MD2 )) return "MD2withRSA"; if (sigAlgId.equals(ID_RSA_WITH_MD5 )) return "MD5withRSA"; if (sigAlgId.equals(ID_RSA_WITH_SHA1 )) return "SHA1withRSA"; return ... |
if (sigAlgId.equals(ID_RSA_WITH_SHA1 )) | } if (sigAlgId.equals(ID_RSA_WITH_SHA1)) { | public String getSigAlgName() { if (sigAlgId.equals(ID_DSA_WITH_SHA1)) return "SHA1withDSA"; if (sigAlgId.equals(ID_RSA_WITH_MD2 )) return "MD2withRSA"; if (sigAlgId.equals(ID_RSA_WITH_MD5 )) return "MD5withRSA"; if (sigAlgId.equals(ID_RSA_WITH_SHA1 )) return "SHA1withRSA"; return ... |
byte[] ext = getExtensionValue("2.5.29.17"); if (ext == null) | Extension e = getExtension(SubjectAlternativeNames.ID); if (e != null) { return ((SubjectAlternativeNames) e.getValue()).getNames(); } | public Collection getSubjectAlternativeNames() throws CertificateParsingException { byte[] ext = getExtensionValue("2.5.29.17"); if (ext == null) return null; return getAltNames(ext); } |
return getAltNames(ext); | public Collection getSubjectAlternativeNames() throws CertificateParsingException { byte[] ext = getExtensionValue("2.5.29.17"); if (ext == null) return null; return getAltNames(ext); } | |
return getSubjectX500Principal(); | return subject; | public Principal getSubjectDN() { return getSubjectX500Principal(); } |
} | public boolean[] getSubjectUniqueID() { if (subjectUniqueId != null) return subjectUniqueId.toBooleanArray(); return null; } | |
return subject; | return new X500Principal(subject.getDer()); | public X500Principal getSubjectX500Principal() { return subject; } |
for (Iterator it = critOids.iterator(); it.hasNext(); ) | for (Iterator it = extensions.values().iterator(); it.hasNext(); ) | public boolean hasUnsupportedCriticalExtension() { for (Iterator it = critOids.iterator(); it.hasNext(); ) { String oid = (String) it.next(); if (!oid.equals("2.5.29.15") && !oid.equals("2.5.29.17") && !oid.equals("2.5.29.18") && !oid.equals("2.5.29.19") && !oid.equals("2.... |
String oid = (String) it.next(); if (!oid.equals("2.5.29.15") && !oid.equals("2.5.29.17") && !oid.equals("2.5.29.18") && !oid.equals("2.5.29.19") && !oid.equals("2.5.29.37")) | Extension e = (Extension) it.next(); if (e.isCritical() && !e.isSupported()) | public boolean hasUnsupportedCriticalExtension() { for (Iterator it = critOids.iterator(); it.hasNext(); ) { String oid = (String) it.next(); if (!oid.equals("2.5.29.15") && !oid.equals("2.5.29.17") && !oid.equals("2.5.29.18") && !oid.equals("2.5.29.19") && !oid.equals("2.... |
throw new ASN1ParsingException("malformed Certificate"); | { throw new IOException("malformed Certificate"); } | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
throw new ASN1ParsingException("malformed TBSCertificate"); | { throw new IOException("malformed TBSCertificate"); } | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
throw new ASN1ParsingException("malformed AlgorithmIdentifier"); | { throw new IOException("malformed AlgorithmIdentifier"); } | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
issuer = new X500Principal(encoded); | val = der.read(); issuer = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read issuer == " + issuer); | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
throw new ASN1ParsingException("malformed Validity"); | { throw new IOException("malformed Validity"); } | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
subject = new X500Principal(encoded); | val = der.read(); subject = new X500DistinguishedName(val.getEncoded()); der.skip(val.getLength()); debug("read subject == " + subject); | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
if (!der.read().isConstructed()) throw new ASN1ParsingException("malformed SubjectPublicKeyInfo"); val = der.read(); if (!val.isConstructed()) throw new ASN1ParsingException("malformed AlgorithmIdentifier"); int keyAlgLen = val.getLength(); val = der.read(); OID keyID = (OID) val.getValue(); byte[] keyParams = null; i... | DERValue spki = der.read(); if (!spki.isConstructed()) | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
val = der.read(); keyParams = val.getEncoded(); if (algVal == null) algVal = keyParams; if (val.isConstructed()) encoded.skip(val.getLength()); | throw new IOException("malformed SubjectPublicKeyInfo"); | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
val = der.read(); byte[] keyVal = ((BitString) val.getValue()).toByteArray(); if (keyID.equals(ID_DSA)) { AlgorithmParameters params = AlgorithmParameters.getInstance("DSA"); params.init(keyParams, "ASN.1"); KeyFactory keyFac = KeyFactory.getInstance("DSA"); DSAParameterSpec spec = (DSAParameterSpec) params.getParamet... | KeyFactory spkFac = KeyFactory.getInstance("X.509"); subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded())); der.skip(spki.getLength()); debug("read subjectPublicKey == " + subjectKey); | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
OID extId = (OID) der.read().getValue(); DERValue val2 = der.read(); Boolean crit = Boolean.valueOf(false); if (val2.getValue() instanceof Boolean) { crit = (Boolean) val2.getValue(); val2 = der.read(); } byte[] extVal = (byte[]) val2.getValue(); extensions.put(extId.toString(), extVal); if (crit.booleanValue()) critOi... | debug("start extension len == " + ext.getLength()); Extension e = new Extension(ext.getEncoded()); extensions.put(e.getOid(), e); der.skip(ext.getLength()); | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
sigAlgVal = keyParams; | { 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(); } } | private void parse(InputStream encoded) throws Exception { DERReader der = new DERReader(encoded); // Certificate ::= SEQUENCE { DERValue cert = der.read(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... |
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(); this.encoded = cert.getEncoded(); if (!cert.isConstructed()) throw new ASN1ParsingException("malformed Certificate"); // TBSCertificate :... | |
return gnu.java.security.x509.X509Certificate.class.getName(); | StringWriter str = new StringWriter(); PrintWriter out = new PrintWriter(str); out.println(X509Certificate.class.getName() + " {"); out.println(" TBSCertificate {"); out.println(" version = " + version + ";"); out.println(" serialNo = " + serialNo + ";"); out.println(" signature = {"); out.println(" algo... | public String toString() { // XXX say more than this. return gnu.java.security.x509.X509Certificate.class.getName(); } |
service_context = new ServiceContext[] { cxCodeSet.STANDARD }; | service_context = new ServiceContext[] { CodeSetServiceContext.STANDARD }; | public RequestHeader() { service_context = new ServiceContext[] { cxCodeSet.STANDARD }; } |
public void read(cdrInput in) | public void read(AbstractCdrInput in) | public void read(cdrInput in) { try { request_id = in.read_ulong(); response_flags = (byte) in.read(); // Skip 3 reserved octets: in.skip(3); // Read target address. AddressingDisposition = in.read_ushort(); switch (AddressingDisposition) { ... |
in.setCodeSet(cxCodeSet.find(service_context)); | in.setCodeSet(CodeSetServiceContext.find(service_context)); | public void read(cdrInput in) { try { request_id = in.read_ulong(); response_flags = (byte) in.read(); // Skip 3 reserved octets: in.skip(3); // Read target address. AddressingDisposition = in.read_ushort(); switch (AddressingDisposition) { ... |
public void write(cdrOutput out) | public void write(AbstractCdrOutput out) | public void write(cdrOutput out) { out.write_ulong(request_id); out.write(response_flags); // Skip 3 reserved octets: out.write(0); out.write(0); out.write(0); // Write addressing disposition from IOR. // TODO FIXME add other addressing methods. out.write_ushort(KeyAddr); out.write_sequ... |
out.setCodeSet(cxCodeSet.find(service_context)); | out.setCodeSet(CodeSetServiceContext.find(service_context)); | public void write(cdrOutput out) { out.write_ulong(request_id); out.write(response_flags); // Skip 3 reserved octets: out.write(0); out.write(0); out.write(0); // Write addressing disposition from IOR. // TODO FIXME add other addressing methods. out.write_ushort(KeyAddr); out.write_sequ... |
this.driver = driver; | public EEPRO100Core(EEPRO100Driver driver, ResourceOwner owner, PCIDevice device, Flags flags) throws ResourceNotFreeException, DriverException { this.driver = driver; this.flags = (EEPRO100Flags) flags; final PCIDeviceConfig config = device.getConfig(); final int irq = config.getInterru... | |
int read_cmd, ee_size; | public EEPRO100Core(EEPRO100Driver driver, ResourceOwner owner, PCIDevice device, Flags flags) throws ResourceNotFreeException, DriverException { this.driver = driver; this.flags = (EEPRO100Flags) flags; final PCIDeviceConfig config = device.getConfig(); final int irq = config.getInterru... | |
StringBuffer sb = new StringBuffer(); | final int mdioWrite(int phy_id, int location, int value) { int val, boguscnt = 7; /* <64 usec. to complete, typ 27 ticks */ regs.setReg32(SCBCtrlMDI, 0x04000000 | (location << 16) | (phy_id << 21) | value); do { systemDelay(10); val = regs.getReg32(SCBCtrlMDI); ... | |
if (name.equals (columnName)) | if (columnName.equals(name)) | public int findColumn (String columnName) { int count = getColumnCount(); for (int index = 0; index < count; index++) { String name = getColumnName (index); if (name.equals (columnName)) return index; } // Unable to locate. return -1; } |
fireTableChanged (new TableModelEvent (this)); | fireTableChanged(new TableModelEvent(this, 0, Integer.MAX_VALUE)); | public void fireTableDataChanged() { fireTableChanged (new TableModelEvent (this)); } |
int index = columnIndex + 1; | public String getColumnName (int columnIndex) { int index = columnIndex + 1; StringBuffer buffer = new StringBuffer(); while (index > 0) { buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; } // Return column name. return buffer.toString(); } | |
while (index > 0) | while (columnIndex >= 0) | public String getColumnName (int columnIndex) { int index = columnIndex + 1; StringBuffer buffer = new StringBuffer(); while (index > 0) { buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; } // Return column name. return buffer.toString(); } |
buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; | buffer.insert (0, (char) ('A' + columnIndex % 26)); columnIndex = columnIndex / 26 - 1; | public String getColumnName (int columnIndex) { int index = columnIndex + 1; StringBuffer buffer = new StringBuffer(); while (index > 0) { buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; } // Return column name. return buffer.toString(); } |
if (Configuration.DEBUG) | Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.SELFCERT_CMD, true); result.setHeader(Messages.getString("SelfCertCmd.14")); //$NON-NLS-1$ result.setFooter(Messages.getString("SelfCertCmd.15")); //$NON-NLS-1$ OptionG... | |
log.finer("-selfcert handler will use the following options:"); log.finer(" -alias=" + alias); log.finer(" -sigalg=" + _sigAlgorithm); log.finer(" -dname=" + _dName); log.finer(" -validity=" + validityInDays); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + p... | if (Configuration.DEBUG) { log.fine("-selfcert handler will use the following options:"); log.fine(" -alias=" + alias); log.fine(" -sigalg=" + _sigAlgorithm); log.fine(" -dname=" + _dName); log.fine(" -validity=" + validityInDays); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine... | void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordNoPrompt(_password); setValidityParam(_validityStr); log.finer("-selfcert handler will use the following options:"); //$NON-NLS-1$ log.finer(" -alias=" + alias)... |
if (Configuration.DEBUG) | void start() throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException, IOException, UnsupportedCallbackException, InvalidKeyException, SignatureException, CertificateException { log.entering(getClass().getName(), "start"); //$NON-NLS-1$ // 1. get the key entry and certificate cha... | |
for (int offset = s.offset; offset < (s.offset + s.count); ++offset) | int end = s.offset + s.count; for (int offset = s.offset; offset < end; ++offset) | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();... |
return pixelX; | return pixelX + pixelWidth; | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics();... |
new noTagModel(P), null), | new noTagModel(new String[] { P, H1, H2, H3, H4, H5, H6 }), null), | protected void defineElements() { /* Define the elements. */ defElement(PCDATA, 0, false, false, null, NONE, NONE, new AttributeList[ 0 ]); defElement(A, 0, false, false, null, new String[] { A } , new String[] { PCDATA, ABBR, ACRONYM, APPLET, B, BASEFONT,... |
UIManager() { } | public UIManager() { } | UIManager() { } |
static UIDefaults getDefaults() { return getLookAndFeel().getDefaults(); } | public static UIDefaults getDefaults() { return getLookAndFeel().getDefaults(); } | static UIDefaults getDefaults() { return getLookAndFeel().getDefaults(); } |
static Dimension getDimension(Object key) { System.out.println("UIManager.getDim"); return new Dimension(200, 100); } | public static Dimension getDimension(Object key) { System.out.println("UIManager.getDim"); return new Dimension(200,100); } | static Dimension getDimension(Object key) { System.out.println("UIManager.getDim"); return new Dimension(200, 100); } |
static Font getFont(Object key) { return (Font) getLookAndFeel().getDefaults().get(key); } | public static Font getFont(Object key) { return (Font) getLookAndFeel().getDefaults().get(key); } | static Font getFont(Object key) // Returns a drawing font from the defaults table. { return (Font) getLookAndFeel().getDefaults().get(key); } |
static Icon getIcon(Object key) { return (Icon) getLookAndFeel().getDefaults().get(key); } | public static Icon getIcon(Object key) { return (Icon) getLookAndFeel().getDefaults().get(key); } | static Icon getIcon(Object key) // Returns an Icon from the defaults table. { return (Icon) getLookAndFeel().getDefaults().get(key); } |
static Insets getInsets(Object key) { return (Insets) getLookAndFeel().getDefaults().getInsets(key); } | public static Insets getInsets(Object key) { return (Insets) getLookAndFeel().getDefaults().getInsets(key); } | static Insets getInsets(Object key) // Returns an Insets object from the defaults table. { return (Insets) getLookAndFeel().getDefaults().getInsets(key); } |
static LookAndFeelInfo[] getInstalledLookAndFeels() { return installed; } | public static LookAndFeelInfo[] getInstalledLookAndFeels() { return installed; } | static LookAndFeelInfo[] getInstalledLookAndFeels() { return installed; } |
static int getInt(Object key) { Integer x = (Integer) getLookAndFeel().getDefaults().get(key); if (x == null) return 0; return x.intValue(); } | public static int getInt(Object key) { Integer x = (Integer) getLookAndFeel().getDefaults().get(key); if (x == null) return 0; return x.intValue(); } | static int getInt(Object key) { Integer x = (Integer) getLookAndFeel().getDefaults().get(key); if (x == null) return 0; return x.intValue(); } |
static LookAndFeel getLookAndFeel() { return look_and_feel; } | public static LookAndFeel getLookAndFeel() { return look_and_feel; } | static LookAndFeel getLookAndFeel() { return look_and_feel; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.