rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (entry != null && key.equals(entry.key)) | if (entry != null && equals(key, entry.key)) | private WeakBucket.WeakEntry internalGet(Object key) { if (key == null) key = NULL_KEY; int slot = hash(key); WeakBucket bucket = buckets[slot]; while (bucket != null) { WeakBucket.WeakEntry entry = bucket.getEntry(); if (entry != null && key.equals(entry.key)) return ent... |
if (buckets[slot] == bucket) | WeakBucket prev = null; WeakBucket next = buckets[slot]; while (next != bucket) { if (next == null) throw new InternalError("WeakHashMap in incosistent state"); prev = next; next = prev.next; } if (prev == null) | void internalRemove(WeakBucket bucket) { int slot = bucket.slot; if (slot == -1) // This bucket was already removed. return; // Mark the bucket as removed. This is necessary, since the // bucket may be enqueued later by the garbage collection, and // internalRemove will be called a second t... |
{ WeakBucket prev = buckets[slot]; while (prev.next != bucket) prev = prev.next; | void internalRemove(WeakBucket bucket) { int slot = bucket.slot; if (slot == -1) // This bucket was already removed. return; // Mark the bucket as removed. This is necessary, since the // bucket may be enqueued later by the garbage collection, and // internalRemove will be called a second t... | |
} | void internalRemove(WeakBucket bucket) { int slot = bucket.slot; if (slot == -1) // This bucket was already removed. return; // Mark the bucket as removed. This is necessary, since the // bucket may be enqueued later by the garbage collection, and // internalRemove will be called a second t... | |
return 0; | return dropAction & ((DropTargetContext) source).getTargetActions(); | public int getDropAction() { return 0; //return dropAction & ((DropTargetContext) source).getTargetActions(); } |
if (System.in == null) { | if ((System.in == null) || (System.in instanceof EmptyInputStream)) { | protected synchronized void startDevice() throws DriverException { this.channel = getChannel(); this.kbInterpreter = createKeyboardInterpreter(); final Device dev = getDevice(); final String id = dev.getId(); this.daemon = new KeyboardDaemon(id + "-daemon"); daemon.start();... |
System.setIn(kis); | AccessController.doPrivileged(new PrivilegedAction() { public Object run() { System.setIn(kis); return null; } }); | protected synchronized void startDevice() throws DriverException { this.channel = getChannel(); this.kbInterpreter = createKeyboardInterpreter(); final Device dev = getDevice(); final String id = dev.getId(); this.daemon = new KeyboardDaemon(id + "-daemon"); daemon.start();... |
System.setIn(null); | AccessController.doPrivileged(new PrivilegedAction() { public Object run() { System.setIn(new EmptyInputStream()); return null; } }); | protected synchronized void stopDevice() throws DriverException { final Device dev = getDevice(); dev.unregisterAPI(KeyboardAPI.class); dev.unregisterAPI(SystemTriggerAPI.class); KeyboardDaemon daemon = this.daemon; if (System.in == kis) { System.setIn(null); } ... |
public KeyboardEvent interpretScancode(int scancode) { | public final KeyboardEvent interpretScancode(int scancode) { final boolean extendedMode = this.extendedMode; if (scancode == XT_EXTENDED) { this.extendedMode = true; return null; } else { this.extendedMode = false; } final boolean released = ((scancode & XT_RELEASE) != 0); final long time = System.currentTimeMillis();... | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... |
if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); | final int vk = deriveKeyCode(scancode, extendedMode); | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... |
int mask; switch (vk) { case KeyEvent.VK_ALT : mask = InputEvent.ALT_DOWN_MASK; break; case KeyEvent.VK_ALT_GRAPH : mask = InputEvent.ALT_GRAPH_DOWN_MASK; break; case KeyEvent.VK_CONTROL : mask = InputEvent.CTRL_DOWN_MASK; break; case KeyEvent.VK_SHIFT : mask = InputEvent.SHIFT_DOWN_MASK; break; default : mask = 0; } ... | adjustFlags(vk, released); | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... |
char ch; | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... | |
long time = System.currentTimeMillis(); lastScancode = scancode; | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... | |
lastScancode = scancode; | public KeyboardEvent interpretScancode(int scancode) { if (scancode == XT_EXTENDED) { lastScancode = scancode; return null; } boolean released = ((scancode & XT_RELEASE) != 0); scancode &= 0x7f; int vk = deriveKeyCode(scancode, (lastScancode == XT_EXTENDED)); // debug output to find new keycodes// Syste... | |
System.err.println("Cannot load default keyboard layout"); | System.err.println("Cannot load default keyboard layout, loading US layout instead"); | public static KeyboardInterpreter getDefaultKeyboardInterpreter() { try { ResourceBundle rb = null; String defaultCountry = null; String defaultRegion = null; try { rb = ResourceBundle.getBundle("org.jnode.driver.input.KeyboardLayout", Locale.getDefault(), Thread.currentThread().getContextClassLoader())... |
return getKeyboardInterpreter(defaultCountry, defaultRegion); | KeyboardInterpreter ki = getKeyboardInterpreter(defaultCountry, defaultRegion); if(ki == null) { throw new NullPointerException("KeyboardInterpreter for "+defaultCountry+" not found"); } else { return ki; } | public static KeyboardInterpreter getDefaultKeyboardInterpreter() { try { ResourceBundle rb = null; String defaultCountry = null; String defaultRegion = null; try { rb = ResourceBundle.getBundle("org.jnode.driver.input.KeyboardLayout", Locale.getDefault(), Thread.currentThread().getContextClassLoader())... |
return new KeyboardInterpreter(); | return null; | public static KeyboardInterpreter getDefaultKeyboardInterpreter() { try { ResourceBundle rb = null; String defaultCountry = null; String defaultRegion = null; try { rb = ResourceBundle.getBundle("org.jnode.driver.input.KeyboardLayout", Locale.getDefault(), Thread.currentThread().getContextClassLoader())... |
SecurityManager sm = Runtime.securityManager; | SecurityManager sm = SecurityManager.current; | public static void setIn(InputStream in) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new RuntimePermission("setIO")); VMSystem.setIn(in); } |
public DefaultComboBoxModel() { } | public DefaultComboBoxModel() { list = new Vector(); } | public DefaultComboBoxModel() { // TODO } // DefaultComboBoxModel() |
public void addElement(Object object) { } | public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size(), list.size()); } | public void addElement(Object object) { // TODO } // addElement() |
public Object getElementAt(int index) { return null; } | public Object getElementAt(int index) { return list.elementAt(index); } | public Object getElementAt(int index) { return null; // TODO } // getElementAt() |
public int getIndexOf(Object object) { return 0; } | public int getIndexOf(Object object) { return list.indexOf(object); } | public int getIndexOf(Object object) { return 0; // TODO } // getIndexOf() |
public Object getSelectedItem() { return null; } | public Object getSelectedItem() { return selectedItem; } | public Object getSelectedItem() { return null; // TODO } // getSelectedItem() |
public int getSize() { return 0; } | public int getSize() { return list.size(); } | public int getSize() { return 0; // TODO } // getSize() |
public void insertElementAt(Object object, int index) { } | public void insertElementAt(Object object, int index) { list.insertElementAt(object, index); fireIntervalAdded(this, index, index); } | public void insertElementAt(Object object, int index) { // TODO } // insertElementAt() |
public void removeAllElements() { } | public void removeAllElements() { int listSize = getSize(); list.clear(); fireIntervalAdded(this, 0, listSize - 1); } | public void removeAllElements() { // TODO } // removeAllElements() |
public void removeElement(Object object) { } | public void removeElement(Object object) { int index = getIndexOf(object); if (index != -1) removeElementAt(index); } | public void removeElement(Object object) { // TODO } // removeElement() |
public void removeElementAt(int index) { } | public void removeElementAt(int index) { list.remove(index); fireIntervalRemoved(this, index, index); } | public void removeElementAt(int index) { // TODO } // removeElementAt() |
public void setSelectedItem(Object object) { } | public void setSelectedItem(Object object) { selectedItem = object; fireContentsChanged(this, -1, -1); } | public void setSelectedItem(Object object) { // TODO } // setSelectedItem() |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() | ensureLoaded(); Enumeration result; if (privateKR == null) result = Collections.enumeration(Collections.EMPTY_SET); else | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
public boolean hasMoreElements() | Set aliases = new HashSet(); for (Enumeration e = privateKR.aliases(); e.hasMoreElements();) | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
return false; | String alias = (String) e.nextElement(); if (alias != null) aliases.add(alias); | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
public Object nextElement() | for (Enumeration e = publicKR.aliases(); e.hasMoreElements();) | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
throw new NoSuchElementException(); | String alias = (String) e.nextElement(); if (alias != null) aliases.add(alias); | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
}; | result = Collections.enumeration(aliases); | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
return keyring.aliases(); | return result; | public Enumeration engineAliases() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return new Enumeration() { public boolean hasMoreElements() { return false; } public Object nextElement... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } return keyring.containsAlias(alias); | log.entering(this.getClass().getName(), "engineContainsAlias", alias); ensureLoaded(); boolean inPrivateKR = privateKR.containsAlias(alias); log.finest("inPrivateKR=" + inPrivateKR); boolean inPublicKR = publicKR.containsAlias(alias); log.finest("inPublicKR=" + inPublicKR); boolean result = inPrivateKR || inPublicKR; ... | public boolean engineContainsAlias(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } return keyring.containsAlias(alias); } |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring != null) { keyring.remove(alias); } | log.entering(this.getClass().getName(), "engineDeleteEntry", alias); ensureLoaded(); if (privateKR.containsAlias(alias)) privateKR.remove(alias); else if (publicKR.containsAlias(alias)) publicKR.remove(alias); else log.finer("Unknwon alias: " + alias); log.exiting(this.getClass().getName(), "engineDeleteEntry"); | public void engineDeleteEntry(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring != null) { keyring.remove(alias); } } |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring"); } return ((IPublicKeyring) keyring).getCertificate(alias); | log.entering(this.getClass().getName(), "engineGetCertificate", alias); ensureLoaded(); Certificate result = publicKR.getCertificate(alias); log.exiting(this.getClass().getName(), "engineGetCertificate", result); return result; | public Certificate engineGetCertificate(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring"); ... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring"); } Enumeration aliases = keyring.aliases(); while (aliases.hasMoreElements()) | log.entering(this.getClass().getName(), "engineGetCertificateAlias", cert); ensureLoaded(); String result = null; for (Enumeration aliases = publicKR.aliases(); aliases.hasMoreElements();) | public String engineGetCertificateAlias(Certificate cert) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring")... |
Certificate cert2 = ((IPublicKeyring) keyring).getCertificate(alias); | Certificate cert2 = publicKR.getCertificate(alias); | public String engineGetCertificateAlias(Certificate cert) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring")... |
return alias; | result = alias; break; | public String engineGetCertificateAlias(Certificate cert) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring")... |
return null; | log.exiting(this.getClass().getName(), "engineGetCertificateAlias", result); return result; | public String engineGetCertificateAlias(Certificate cert) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring")... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalStateException("not a private keyring"); } return ((IPrivateKeyring) keyring).getCertPath(alias); | log.entering(this.getClass().getName(), "engineGetCertificateChain", alias); ensureLoaded(); Certificate[] result = privateKR.getCertPath(alias); log.exiting(this.getClass().getName(), "engineGetCertificateChain", result); return result; | public Certificate[] engineGetCertificateChain(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalStateException("not a private keyr... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } List entries = keyring.get(alias); if (entries.size() == 0) { return null; } for (Iterator it = entries.iterator(); it.hasNext();) { Object o = it.next(); if (o instanceof PrimitiveEntry) { return ((PrimitiveEntry) o)... | log.entering(this.getClass().getName(), "engineGetCreationDate", alias); ensureLoaded(); Date result = getCreationDate(alias, privateKR); if (result == null) result = getCreationDate(alias, publicKR); log.exiting(this.getClass().getName(), "engineGetCreationDate", result); return result; | public Date engineGetCreationDate(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } List entries = keyring.get(alias); if (entries.size() == 0) { return null; } for (Iterator it = en... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalStateException("not a private keyring"); } | log.entering(this.getClass().getName(), "engineGetKey", String.valueOf(password)); ensureLoaded(); Key result = null; | public Key engineGetKey(String alias, char[] password) throws UnrecoverableKeyException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalSt... |
if (((IPrivateKeyring) keyring).containsPublicKey(alias)) { return ((IPrivateKeyring) keyring).getPublicKey(alias); } | if (privateKR.containsPublicKey(alias)) result = privateKR.getPublicKey(alias); | public Key engineGetKey(String alias, char[] password) throws UnrecoverableKeyException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalSt... |
if (((IPrivateKeyring) keyring).containsPrivateKey(alias)) { return ((IPrivateKeyring) keyring).getPrivateKey(alias, password); } return null; | else if (privateKR.containsPrivateKey(alias)) result = privateKR.getPrivateKey(alias, password); log.exiting(this.getClass().getName(), "engineGetKey", result); return result; | public Key engineGetKey(String alias, char[] password) throws UnrecoverableKeyException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return null; } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalSt... |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } if (!(keyring instanceof IPublicKeyring)) { return false; } return ((IPublicKeyring) keyring).containsCertificate(alias); | log.entering(this.getClass().getName(), "engineIsCertificateEntry", alias); ensureLoaded(); boolean result = publicKR.containsCertificate(alias); log.exiting(this.getClass().getName(), "engineIsCertificateEntry", Boolean.valueOf(result)); return result; | public boolean engineIsCertificateEntry(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } if (!(keyring instanceof IPublicKeyring)) { return false; } return ((IPublicKeyring) keyring).... |
if (!loaded) { throw new IllegalStateException ("not loaded"); | log.entering(this.getClass().getName(), "engineIsKeyEntry", alias); ensureLoaded(); boolean result = privateKR.containsPublicKey(alias) || privateKR.containsPrivateKey(alias); log.exiting(this.getClass().getName(), "engineIsKeyEntry", Boolean.valueOf(result)); return result; | public boolean engineIsKeyEntry(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } if (!(keyring instanceof IPrivateKeyring)) { return false; } return ((IPrivateKeyring) keyring).contai... |
if (keyring == null) { return false; } if (!(keyring instanceof IPrivateKeyring)) { return false; } return ((IPrivateKeyring) keyring).containsPublicKey(alias) || ((IPrivateKeyring) keyring).containsPrivateKey(alias); } | public boolean engineIsKeyEntry(String alias) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return false; } if (!(keyring instanceof IPrivateKeyring)) { return false; } return ((IPrivateKeyring) keyring).contai... | |
{ | { log.entering(this.getClass().getName(), "engineLoad", String.valueOf(password)); | public void engineLoad(InputStream in, char[] password) throws IOException { if (in != null) { if (!in.markSupported()) { in = new BufferedInputStream(in); } in.mark(5); for (int i = 0; i < 4; i++) if (in.read() != Registry.GKR_MAGIC[i]) t... |
if (!in.markSupported()) { in = new BufferedInputStream(in); } in.mark(5); for (int i = 0; i < 4; i++) if (in.read() != Registry.GKR_MAGIC[i]) throw new MalformedKeyringException("incorrect magic"); int usage = in.read(); in.reset(); HashMap attr = new HashMap(); attr.put(IKeyring.KEYRING_DATA_IN, in); attr.put(IKeyrin... | if (! in.markSupported()) in = new BufferedInputStream(in); loadPrivateKeyring(in, password); loadPublicKeyring(in, password); | public void engineLoad(InputStream in, char[] password) throws IOException { if (in != null) { if (!in.markSupported()) { in = new BufferedInputStream(in); } in.mark(5); for (int i = 0; i < 4; i++) if (in.read() != Registry.GKR_MAGIC[i]) t... |
log.exiting(this.getClass().getName(), "engineLoad"); | public void engineLoad(InputStream in, char[] password) throws IOException { if (in != null) { if (!in.markSupported()) { in = new BufferedInputStream(in); } in.mark(5); for (int i = 0; i < 4; i++) if (in.read() != Registry.GKR_MAGIC[i]) t... | |
if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPublicKeyring("HMAC-SHA-1", 20); } if (!(keyring instanceof IPublicKeyring)) { throw new IllegalStateException("not a public keyring"); } ((IPublicKeyring) keyring).putCertificate(alias, cert); | log.entering(this.getClass().getName(), "engineSetCertificateEntry", new Object[] { alias, cert }); ensureLoaded(); publicKR.putCertificate(alias, cert); log.exiting(this.getClass().getName(), "engineSetCertificateEntry"); | public void engineSetCertificateEntry(String alias, Certificate cert) { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPublicKeyring("HMAC-SHA-1", 20); } if (!(keyring instanceof IPublicKeyring)) { throw ... |
Certificate[] chain) throws KeyStoreException { if (!loaded) | Certificate[] chain) throws KeyStoreException | public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPrivateKeyring("HMAC-SHA-1",... |
throw new IllegalStateException ("not loaded"); } if (keyring == null) | log.entering(this.getClass().getName(), "engineSetKeyEntry", new Object[] { alias, key, password, chain }); ensureLoaded(); if (key instanceof PublicKey) privateKR.putPublicKey(alias, (PublicKey) key); else | public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPrivateKeyring("HMAC-SHA-1",... |
keyring = new GnuPrivateKeyring("HMAC-SHA-1", 20, "AES", "OFB", 16); } if (!(keyring instanceof IPrivateKeyring)) { throw new IllegalStateException("not a private keyring"); } if (key instanceof PublicKey) { ((IPrivateKeyring) keyring).putPublicKey(alias, (PublicKey) key); return; } if (!(key instanceof PrivateKey) && ... | if (! (key instanceof PrivateKey) && ! (key instanceof SecretKey)) | public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPrivateKeyring("HMAC-SHA-1",... |
try { CertificateFactory fact = CertificateFactory.getInstance("X.509"); ((IPrivateKeyring) keyring).putCertPath(alias, chain); } catch (CertificateException ce) { throw new KeyStoreException(ce.toString()); } ((IPrivateKeyring) keyring).putPrivateKey(alias, key, password); | log.exiting(this.getClass().getName(), "engineSetKeyEntry"); | public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { keyring = new GnuPrivateKeyring("HMAC-SHA-1",... |
{ if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return 0; } return keyring.size(); } | { ensureLoaded(); return privateKR.size() + publicKR.size(); } | public int engineSize() { if (!loaded) { throw new IllegalStateException ("not loaded"); } if (keyring == null) { return 0; } return keyring.size(); } |
{ if (!loaded || keyring == null) | public void engineStore(OutputStream out, char[] password) throws IOException { if (!loaded || keyring == null) { throw new IllegalStateException ("not loaded"); } HashMap attr = new HashMap(); attr.put(IKeyring.KEYRING_DATA_OUT, out); attr.put(IKeyring.KEYRING_PASSWORD, password); ke... | |
throw new IllegalStateException ("not loaded"); } | log.entering(this.getClass().getName(), "engineStore", String.valueOf(password)); ensureLoaded(); | public void engineStore(OutputStream out, char[] password) throws IOException { if (!loaded || keyring == null) { throw new IllegalStateException ("not loaded"); } HashMap attr = new HashMap(); attr.put(IKeyring.KEYRING_DATA_OUT, out); attr.put(IKeyring.KEYRING_PASSWORD, password); ke... |
keyring.store(attr); | privateKR.store(attr); publicKR.store(attr); log.exiting(this.getClass().getName(), "engineStore"); | public void engineStore(OutputStream out, char[] password) throws IOException { if (!loaded || keyring == null) { throw new IllegalStateException ("not loaded"); } HashMap attr = new HashMap(); attr.put(IKeyring.KEYRING_DATA_OUT, out); attr.put(IKeyring.KEYRING_PASSWORD, password); ke... |
public BufferedImage filter(BufferedImage src, BufferedImage dst) | public final BufferedImage filter(BufferedImage src, BufferedImage dst) | public BufferedImage filter(BufferedImage src, BufferedImage dst) { // TODO: The plan is to create a scanline buffer for intermediate buffers. // For now we just suck it up and create intermediate buffers. if (dst == null && spaces.length == 0) throw new IllegalArgumentException(); // Make sure ... |
public Rectangle2D getBounds2D(BufferedImage src) | public final Rectangle2D getBounds2D(BufferedImage src) | public Rectangle2D getBounds2D(BufferedImage src) { return src.getRaster().getBounds(); } |
public ICC_Profile[] getICC_Profiles() | public final ICC_Profile[] getICC_Profiles() | public ICC_Profile[] getICC_Profiles() { return profiles; } |
public Point2D getPoint2D(Point2D src, Point2D dst) | public final Point2D getPoint2D(Point2D src, Point2D dst) | public Point2D getPoint2D(Point2D src, Point2D dst) { if (dst == null) return (Point2D)src.clone(); dst.setLocation(src); return dst; } |
public RenderingHints getRenderingHints() | public final RenderingHints getRenderingHints() | public RenderingHints getRenderingHints() { return hints; } |
public float[] getPixel(int x, int y, float[] fArray) | public int[] getPixel(int x, int y, int[] iArray) | public float[] getPixel(int x, int y, float[] fArray) { return sampleModel.getPixel(x-sampleModelTranslateX, y-sampleModelTranslateY, fArray, dataBuffer); } |
fArray, dataBuffer); | iArray, dataBuffer); | public float[] getPixel(int x, int y, float[] fArray) { return sampleModel.getPixel(x-sampleModelTranslateX, y-sampleModelTranslateY, fArray, dataBuffer); } |
public void setPixel(int x, int y, float[] fArray) { sampleModel.setPixel(x - sampleModelTranslateX, y - sampleModelTranslateY, fArray, dataBuffer); | public void setPixel(int x, int y, int[] iArray) { sampleModel.setPixel(x-sampleModelTranslateX, y-sampleModelTranslateY, iArray, dataBuffer); | public void setPixel(int x, int y, float[] fArray) { sampleModel.setPixel(x - sampleModelTranslateX, y - sampleModelTranslateY, fArray, dataBuffer); } |
public RenderingHints getRenderingHints(); | RenderingHints getRenderingHints(); | public RenderingHints getRenderingHints(); |
emitArray(cls, obj, (VmArrayClass) vmClass); | emitArray(cls, obj, (VmArrayClass<?>) vmClass); | public final void emitObject(Object obj) throws BuildException, ClassNotFoundException { if (obj == null) { return; } final Class< ? > cls = obj.getClass(); try { testForValidEmit(obj, cls.getName()); } catch (JNodeClassNotFoundException ex) { ... |
public DEREncodingException (String msg) | public DEREncodingException() | public DEREncodingException (String msg) { super (msg); } |
super (msg); | super (); | public DEREncodingException (String msg) { super (msg); } |
TimeZone tz = (TimeZone)timezones.get(ID); if (tz != null) { | TimeZone tz = (TimeZone) timezones().get(ID); if (tz != null) { | public static TimeZone getTimeZone(String ID) { // First check timezones hash TimeZone tz = (TimeZone)timezones.get(ID); if (tz != null) { if (tz.getID().equals(ID)) return tz; // We always return a timezone with the requested ID. // This is the same behaviour as with JDK1.2. tz = (TimeZone)tz.clone(); ... |
timezones.put(ID, tz); | timezones().put(ID, tz); | public static TimeZone getTimeZone(String ID) { // First check timezones hash TimeZone tz = (TimeZone)timezones.get(ID); if (tz != null) { if (tz.getID().equals(ID)) return tz; // We always return a timezone with the requested ID. // This is the same behaviour as with JDK1.2. tz = (TimeZone)tz.clone(); ... |
public BasicAttribute (String id, Object value) | private BasicAttribute () | public BasicAttribute (String id, Object value) { this (id, value, false); } |
this (id, value, false); | public BasicAttribute (String id, Object value) { this (id, value, false); } | |
throws IOException | throws IOException, NotImplementedException | public void writeBit(int bit) throws IOException { // FIXME: Implement me. throw new Error("not implemented"); } |
throws IOException | throws IOException, NotImplementedException | public void writeUTF(String data) throws IOException { throw new Error("not implemented"); } |
if (w == 0 || h == 0) return; | public synchronized void addDirtyRegion(JComponent component, int x, int y, int w, int h) { Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle)dirtyComponents.get(component)); dirtyComponents.put(component... | |
if (getDeclaringClass() != e.getDeclaringClass()) throw new ClassCastException(); | public final int compareTo(T e) { return ordinal - e.ordinal; } | |
return (S) etype.getDeclaredField(s).get(null); | Field f = etype.getDeclaredField(s); if (! f.isEnumConstant()) throw new IllegalArgumentException(s); return (S) f.get(null); | public static <S extends Enum<S>> S valueOf(Class<S> etype, String s) { if (etype == null || s == null) throw new NullPointerException(); try { return (S) etype.getDeclaredField(s).get(null); } catch (NoSuchFieldException exception) { throw new IllegalArgu... |
cal.set(Calendar.SECOND, (dosTime & 0x1f) * 2); | cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, (dosTime & 0x1f) * 2); | public static long decodeDateTime(int dosDate, int dosTime) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.SECOND, (dosTime & 0x1f) * 2); cal.set(Calendar.MINUTE, (dosTime >> 5) & 0x3f); cal.set(Calendar.HOUR_OF_DAY, dosTime >> 11); cal.set(Calendar.DATE, dosDate & 0x1f); cal.set(Calendar.MONTH, (... |
pos.y = contentRect.y + contentRect.height - viewBounds.height; | pos.y = contentRect.y + contentRect.height - portBounds.height; | public void scrollRectToVisible(Rectangle contentRect) { Component view = getView(); if (view == null) return; Point pos = getViewPosition(); Rectangle viewBounds = getView().getBounds(); Rectangle portBounds = getBounds(); if (isShowing()) getView().validate(); // If... |
pos.x = contentRect.x + contentRect.width - viewBounds.width; | pos.x = contentRect.x + contentRect.width - portBounds.width; | public void scrollRectToVisible(Rectangle contentRect) { Component view = getView(); if (view == null) return; Point pos = getViewPosition(); Rectangle viewBounds = getView().getBounds(); Rectangle portBounds = getBounds(); if (isShowing()) getView().validate(); // If... |
if (Configuration.DEBUG) | Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.KEYCLONE_CMD, true); result.setHeader(Messages.getString("KeyCloneCmd.22")); //$NON-NLS-1$ result.setFooter(Messages.getString("KeyCloneCmd.21")); //$NON-NLS-1$ OptionG... | |
log.finer("-keyclone handler will use the following options:"); log.finer(" -alias=" + alias); log.finer(" -dest=" + destinationAlias); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + provider); log.finer(" -v=" + verbose); | if (Configuration.DEBUG) { log.fine("-keyclone handler will use the following options:"); log.fine(" -alias=" + alias); log.fine(" -dest=" + destinationAlias); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine(" -provider=" + provider); log.fine(" -v=" + verbose); } | void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordNoPrompt(_password); setDestinationAlias(_destAlias); log.finer("-keyclone handler will use the following options:"); //$NON-NLS-1$ log.finer(" -alias=" + alias... |
if (Configuration.DEBUG) | void start() throws KeyStoreException, NoSuchAlgorithmException, IOException, UnsupportedCallbackException, UnrecoverableKeyException, CertificateException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ if (store.containsAlias(destinationAlias)) throw new SecurityException(Mes... | |
public synchronized void add(OptionGroup group) | public synchronized void add(Option opt) | public synchronized void add(OptionGroup group) { options.addAll(group.options); // This ensures that the final group always appears at the end // of the options. if (optionGroups.isEmpty()) optionGroups.add(group); else optionGroups.add(optionGroups.size() - 1, group); } |
options.addAll(group.options); if (optionGroups.isEmpty()) optionGroups.add(group); else optionGroups.add(optionGroups.size() - 1, group); | options.add(opt); defaultGroup.add(opt); | public synchronized void add(OptionGroup group) { options.addAll(group.options); // This ensures that the final group always appears at the end // of the options. if (optionGroups.isEmpty()) optionGroups.add(group); else optionGroups.add(optionGroups.size() - 1, group); } |
if (Configuration.DEBUG) | public static String getFormattedString(String key, Object args) { MessageFormat mf = (MessageFormat) CACHED_FORMATS.get(key); if (mf == null) { String formatString = getString(key); if (formatString.startsWith("!")) return constructMessage(key, args); mf = new MessageForma... | |
setProviderClassNameParam(className); setKeystoreTypeParam(type); setKeystorePasswordParam(password); setKeystoreURLParam(url); | setKeyStoreParams(false, className, type, password, url); | protected void setKeyStoreParams(String className, String type, String password, String url) throws IOException, UnsupportedCallbackException, KeyStoreException, NoSuchAlgorithmException, CertificateException { setProviderClassNameParam(className); setKeystoreTypePar... |
protected void saveKeyStore() throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException | protected void saveKeyStore(char[] password) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException | protected void saveKeyStore() throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException { saveKeyStore(storePasswordChars); } |
saveKeyStore(storePasswordChars); | if (Configuration.DEBUG) log.entering(this.getClass().getName(), "saveKeyStore"); URLConnection con = storeURL.openConnection(); con.setDoOutput(true); con.setUseCaches(false); OutputStream out = con.getOutputStream(); if (verbose) System.out.println(Messages.getFormattedString("Command.63", storeURL.getPath())); stor... | protected void saveKeyStore() throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException { saveKeyStore(storePasswordChars); } |
public void dumpData(PrintStream out) { out.println("Intialization Block - 32 bit mode"); | public void dumpData(Logger out) { out.debug("Intialization Block - 32 bit mode"); | public void dumpData(PrintStream out) { out.println("Intialization Block - 32 bit mode"); for (int i = 0; i <= INIT_BLOCK_SIZE - 1; i += 4) { out.println( "0x" + NumberUtils.hex( Address.as32bit(mem.getAddress()) + offset + i) + " : 0x" + NumberUtils.hex((byte) i) + " : 0x" + NumberUtil... |
out.println( | out.debug( | public void dumpData(PrintStream out) { out.println("Intialization Block - 32 bit mode"); for (int i = 0; i <= INIT_BLOCK_SIZE - 1; i += 4) { out.println( "0x" + NumberUtils.hex( Address.as32bit(mem.getAddress()) + offset + i) + " : 0x" + NumberUtils.hex((byte) i) + " : 0x" + NumberUtil... |
public void dumpData(PrintStream out) { out.println("Receive Ring Descriptors - 32 bit mode"); | public void dumpData(Logger out) { out.debug("Receive Ring Descriptors - Software Style 2"); | public void dumpData(PrintStream out) { out.println("Receive Ring Descriptors - 32 bit mode"); for (int i = 0; i < length; i++) { out.println("Descriptor " + i); rxDescriptors[i].dumpData(out); } } |
out.println("Descriptor " + i); | out.debug("Descriptor " + i); | public void dumpData(PrintStream out) { out.println("Receive Ring Descriptors - 32 bit mode"); for (int i = 0; i < length; i++) { out.println("Descriptor " + i); rxDescriptors[i].dumpData(out); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.