rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
r.setBounds(copy); result = getView(i); break;
childAllocation(0, r); result = getView(0); } else { for (int i = 0; i < count && result == null; i++) { if (x < r.x + offsets[X_AXIS][i]) { childAllocation(i - 1, r); result = getView(i - 1);
protected View getViewAtPoint(int x, int y, Rectangle r) { View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); // The next call modifies copy. childAllocation(i, copy); if (copy.contains(x...
if (result == null && count > 0) return getView(count - 1);
} } else { if (y < r.y + offsets[Y_AXIS][0]) { childAllocation(0, r); result = getView(0); } else { for (int i = 0; i < count && result == null; i++) { if (y < r.y + offsets[Y_AXIS][i]) { childAllocation(i - 1, r); result = getView(i - 1); } } } } if (result == null) { childAllocation(count - 1, r); result = getView...
protected View getViewAtPoint(int x, int y, Rectangle r) { View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); // The next call modifies copy. childAllocation(i, copy); if (copy.contains(x...
return span[X_AXIS] + getLeftInset() - getRightInset();
return span[X_AXIS] + getLeftInset() + getRightInset();
public int getWidth() { return span[X_AXIS] + getLeftInset() - getRightInset(); }
int[] newSpan = new int[]{ width, height }; int count = getViewCount(); int minorAxis = myAxis == X_AXIS ? Y_AXIS : X_AXIS; if ((! isLayoutValid(minorAxis)) || newSpan[minorAxis] != span[minorAxis]) { layoutValid[minorAxis] = false; span[minorAxis] = newSpan[minorAxis]; layoutMinorAxis(span[minorAxis], minorAxis, o...
layoutAxis(X_AXIS, width); layoutAxis(Y_AXIS, height);
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
layoutValid[minorAxis] = true; } if ((! isLayoutValid(myAxis)) || newSpan[myAxis] != span[myAxis]) { layoutValid[myAxis] = false; span[myAxis] = newSpan[myAxis]; layoutMajorAxis(span[myAxis], myAxis, offsets[myAxis], spans[myAxis]); for (int i = 0; i < count; ++i) { getView(i).setSize(spans[X_AXIS][i], spans[Y_AXI...
protected void layout(int width, int height) { int[] newSpan = new int[]{ width, height }; int count = getViewCount(); // Update minor axis as appropriate. We need to first update the minor // axis layout because that might affect the children's preferences along // the major axis. int minorAxis = ...
sumPref = spans[i];
sumPref += spans[i];
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // Set the spans to the preferred sizes. Determine the space // that we have to adjust the sizes afterwards. long sumPref = 0; int n = getViewCount(); for (int i = 0; i < n; i++) ...
Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds();
Rectangle alloc = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle(); int count ...
int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset();
alloc = getInsideAllocation(alloc);
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle(); int count ...
Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle();
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle(); int count ...
for (int i = 0; i < count; ++i)
for (int i = 0; i < count; i++)
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle(); int count ...
tmp.x = x + getOffset(X_AXIS, i); tmp.y = y + getOffset(Y_AXIS, i); tmp.width = getSpan(X_AXIS, i); tmp.height = getSpan(Y_AXIS, i); if (tmp.intersects(clip)) paintChild(g, tmp, i);
View child = getView(i); tmpRect.setBounds(alloc); childAllocation(i, tmpRect); if (g.hitClip(tmpRect.x, tmpRect.y, tmpRect.width, tmpRect.height)) paintChild(g, tmpRect, i);
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Rectangle(); int count ...
int numViews = 0; if (views != null) numViews = views.length; int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spans[X_AXIS], 0, newSpansX, 0, offset); System.arraycopy(spans[X_AXIS], offset + length, newSpansX, offset + numViews, oldSize - (offset + length)); s...
public void replace(int offset, int length, View[] views) { int numViews = 0; if (views != null) numViews = views.length; // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spa...
layoutValid[X_AXIS] = false; requirementsValid[X_AXIS] = false; layoutValid[Y_AXIS] = false; requirementsValid[Y_AXIS] = false;
int newItems = views != null ? views.length : 0; int minor = 1 - myAxis; offsets[myAxis] = replaceLayoutArray(offsets[myAxis], offset, newItems); spans[myAxis] = replaceLayoutArray(spans[myAxis], offset, newItems); layoutValid[myAxis] = false; requirementsValid[myAxis] = false; offsets[minor] = replaceLayoutArray(offse...
public void replace(int offset, int length, View[] views) { int numViews = 0; if (views != null) numViews = views.length; // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spa...
if (changed) preferenceChanged(null, true, true);
public void setAxis(int axis) { myAxis = axis; }
if (! isAllocationValid()) { Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); setSize(r.width, r.height); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) { // FIXME: What to do here? return super.viewToModel(x, y, a, bias); }
public abstract void setCheckboxGroup(java.awt.CheckboxGroup group);
void setCheckboxGroup (CheckboxGroup group);
public abstract void setCheckboxGroup(java.awt.CheckboxGroup group);
public abstract void setState(boolean state);
void setState (boolean state);
public abstract void setState(boolean state);
if (DEBUG && debuglevel > 0)
if (Configuration.DEBUG)
public KeyPair generate() { if (p == null) { BigInteger[] params = new FIPS186(L, rnd).generateParameters(); seed = params[FIPS186.DSA_PARAMS_SEED]; counter = params[FIPS186.DSA_PARAMS_COUNTER]; q = params[FIPS186.DSA_PARAMS_Q]; p = params[FIPS186.DSA_PARAMS_P]; e = ...
debug("seed: " + seed.toString(16)); debug("counter: " + counter.intValue()); debug("q: " + q.toString(16)); debug("p: " + p.toString(16)); debug("e: " + e.toString(16)); debug("g: " + g.toString(16));
log.fine("seed: " + seed.toString(16)); log.fine("counter: " + counter.intValue()); log.fine("q: " + q.toString(16)); log.fine("p: " + p.toString(16)); log.fine("e: " + e.toString(16)); log.fine("g: " + g.toString(16));
public KeyPair generate() { if (p == null) { BigInteger[] params = new FIPS186(L, rnd).generateParameters(); seed = params[FIPS186.DSA_PARAMS_SEED]; counter = params[FIPS186.DSA_PARAMS_COUNTER]; q = params[FIPS186.DSA_PARAMS_Q]; p = params[FIPS186.DSA_PARAMS_P]; e = ...
{
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else getDefaultPRNG().nextBytes(buffer); }
}
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else getDefaultPRNG().nextBytes(buffer); }
{
public void setup(Map attributes) { // find out the modulus length Integer l = (Integer) attributes.get(MODULUS_LENGTH); L = (l == null ? DEFAULT_MODULUS_LENGTH : l.intValue()); if ((L % 64) != 0 || L < 512 || L > 1024) throw new IllegalArgumentException(MODULUS_LENGTH); // should we use the defa...
}
public void setup(Map attributes) { // find out the modulus length Integer l = (Integer) attributes.get(MODULUS_LENGTH); L = (l == null ? DEFAULT_MODULUS_LENGTH : l.intValue()); if ((L % 64) != 0 || L < 512 || L > 1024) throw new IllegalArgumentException(MODULUS_LENGTH); // should we use the defa...
return modInverse(m);
return modInverse(m).modPow(exponent.negate(), m);
public BigInteger modPow(BigInteger exponent, BigInteger m) { if (m.isNegative() || m.isZero()) throw new ArithmeticException("non-positive modulo"); if (exponent.isNegative()) return modInverse(m); if (exponent.isOne()) return mod(m); // To do this naively by first raising this to the pow...
if (!isSeeded) setSeed(getSeed(32));
public void nextBytes(byte[] bytes) { randomBytesUsed += bytes.length; counter++; secureRandomSpi.engineNextBytes(bytes); }
throws NotImplementedException
public void focusGained(FocusEvent e) throws NotImplementedException { // FIXME: implement. }
slider.repaint(); hasFocus = true;
public void focusGained(FocusEvent e) throws NotImplementedException { // FIXME: implement. }
throws NotImplementedException
public void focusLost(FocusEvent e) throws NotImplementedException { // FIXME: implement. }
slider.repaint(); hasFocus = false;
public void focusLost(FocusEvent e) throws NotImplementedException { // FIXME: implement. }
if (hasFocus) paintFocus(g);
public void paint(Graphics g, JComponent c) { // FIXME: Move this to propertyChangeEvent handler, when we get those. leftToRightCache = slider.getComponentOrientation() != ComponentOrientation.RIGHT_TO_LEFT; // FIXME: This next line is only here because the above line is here. calculateGeometry()...
return new Dimension(fixedCellWidth, getModel().getSize() * fixedCellHeight);
return new Dimension(fixedCellWidth, size * fixedCellHeight);
public Dimension getPreferredScrollableViewportSize() { //If the layout orientation is not VERTICAL, then this will //return the value from getPreferredSize. The current ListUI is //expected to override getPreferredSize to return an appropriate value. if (getLayoutOrientation() != VERTICAL) return...
int prefWidth, prefHeight;
if (size == 0) { if (fixedCellWidth == -1) return new Dimension(256, 16 * getVisibleRowCount()); else return new Dimension (fixedCellWidth, 16 * getVisibleRowCount()); } int prefWidth;
public Dimension getPreferredScrollableViewportSize() { //If the layout orientation is not VERTICAL, then this will //return the value from getPreferredSize. The current ListUI is //expected to override getPreferredSize to return an appropriate value. if (getLayoutOrientation() != VERTICAL) return...
{ prefWidth = 0; int size = getModel().getSize(); for (int i = 0; i < size; i++) if (getCellBounds(i, i).width > prefWidth) prefWidth = getCellBounds(i, i).width; }
prefWidth = getPreferredSize().width;
public Dimension getPreferredScrollableViewportSize() { //If the layout orientation is not VERTICAL, then this will //return the value from getPreferredSize. The current ListUI is //expected to override getPreferredSize to return an appropriate value. if (getLayoutOrientation() != VERTICAL) return...
if (getModel().getSize() == 0 && fixedCellWidth == -1) return new Dimension(256, 16 * getVisibleRowCount()); else if (getModel().getSize() == 0) return new Dimension (fixedCellWidth, 16 * getVisibleRowCount());
int prefHeight;
public Dimension getPreferredScrollableViewportSize() { //If the layout orientation is not VERTICAL, then this will //return the value from getPreferredSize. The current ListUI is //expected to override getPreferredSize to return an appropriate value. if (getLayoutOrientation() != VERTICAL) return...
{ prefHeight = getVisibleRowCount() * getCellBounds (getFirstVisibleIndex(), getFirstVisibleIndex()).height; }
prefHeight = getVisibleRowCount() * getCellBounds(0, 0).height;
public Dimension getPreferredScrollableViewportSize() { //If the layout orientation is not VERTICAL, then this will //return the value from getPreferredSize. The current ListUI is //expected to override getPreferredSize to return an appropriate value. if (getLayoutOrientation() != VERTICAL) return...
protected AccessibleJColorChooser(JColorChooser component) { super(component); }
protected AccessibleJColorChooser() { }
protected AccessibleJColorChooser(JColorChooser component) { super(component); // TODO } // AccessibleJColorChooser()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJColorChooser(this); } return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJColorChooser(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJColorChooser(this); } // if return accessibleContext; } // getAccessibleContext()
final Extent size = Extent.fromIntZeroExtend(length);
final Extent size = Extent.fromIntZeroExtend(length * 4);
public void getInts(int memPtr, int[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.le...
String s = value.toString();
String s = value != null ? value.toString() : "";
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); setHorizontalAlignment(LEF...
public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
public static int showConfirmDialog(Component parentComponent, Object message)
public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) { JOptionPane pane = new JOptionPane(message, messageType, optionType); JDialog dialog = pane.createDialog(pare...
JOptionPane pane = new JOptionPane(message, messageType, optionType); JDialog dialog = pane.createDialog(parentComponent, title);
JOptionPane pane = new JOptionPane(message); JDialog dialog = pane.createDialog(parentComponent, "Select an Option");
public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType) { JOptionPane pane = new JOptionPane(message, messageType, optionType); JDialog dialog = pane.createDialog(pare...
if (created) { DomDocument domDoc = (DomDocument) parent; domDoc.setBuilding(false); domDoc.setCheckWellformedness(true); }
public void transform(Source xmlSource, Result outputTarget) throws TransformerException { // Get the source tree DOMSource source; synchronized (factory.resolver) { factory.resolver.setUserResolver(uriResolver); factory.resolver.setUserListener(errorListener); source = factory....
int hi = Integer.reverse((int) val); int lo = Integer.reverse((int) (val >>> 32)); return (((long) hi) << 32) | lo;
long hi = Integer.reverse((int) val) & 0xffffffffL; long lo = Integer.reverse((int) (val >>> 32)) & 0xffffffffL; return (hi << 32) | lo;
public static long reverse(long val) { int hi = Integer.reverse((int) val); int lo = Integer.reverse((int) (val >>> 32)); return (((long) hi) << 32) | lo; }
public static Long valueOf(String s)
public static Long valueOf(String s, int radix)
public static Long valueOf(String s) { return new Long(parseLong(s, 10, false)); }
return new Long(parseLong(s, 10, false));
return new Long(parseLong(s, radix, false));
public static Long valueOf(String s) { return new Long(parseLong(s, 10, false)); }
if (file.isDirectory()) { URL url = getURL(); return url.openStream(); }
InputStream getInputStream() throws IOException { // Delegate to the URL content handler mechanism to retrieve an // HTML representation of the directory listing if a directory if (file.isDirectory()) { URL url = getURL(); return url.openStream(); } // Otherwis...
if (file.isDirectory()) { URL url = getURL(); try { URLConnection connection = url.openConnection(); return connection.getContentLength(); } catch (IOException e) { return -1; } }
public int getLength() { // Delegate to the URL content handler mechanism to retrieve the // length of the HTML representation of the directory listing if // a directory, or -1 if an exception occurs opening the directory. if (file.isDirectory()) { URL url = getURL(); ...
File file = new File(dir, name); if (file.exists()) return new FileResource(this, name, file);
try { File file = new File(dir, name).getCanonicalFile(); if (file.exists() && !file.isDirectory()) return new FileResource(this, file.getPath(), file); } catch (IOException e) { }
Resource getResource(String name) { File file = new File(dir, name); if (file.exists()) return new FileResource(this, name, file); return null; }
synchronized (urlloaders)
synchronized (this)
private void addURLImpl(URL newUrl) { synchronized (urlloaders) { if (newUrl == null) return; // Silently ignore... // Reset the toString() value. thisString = null; // Check global cache to see if there're already url loader // for this url. URLLoader loader = (URLLoader) urlloaders.get(newUrl); i...
String specTitle = attr.getValue(Attributes.Name.SPECIFICATION_TITLE); String specVersion = attr.getValue(Attributes.Name.SPECIFICATION_VERSION); String specVendor = attr.getValue(Attributes.Name.SPECIFICATION_VENDOR); String implTitle = attr.getValue(Attributes.Name.IMPLEMENTATION_TITLE); String implVersion = attr.get...
String specTitle = getAttributeValue(Attributes.Name.SPECIFICATION_TITLE, entryAttr, attr); String specVersion = getAttributeValue(Attributes.Name.SPECIFICATION_VERSION, entryAttr, attr); String specVendor = getAttributeValue(Attributes.Name.SPECIFICATION_VENDOR, entryAttr, attr); String implTitle = getAttributeValue(A...
protected Package definePackage(String name, Manifest manifest, URL url) throws IllegalArgumentException { Attributes attr = manifest.getMainAttributes(); String specTitle = attr.getValue(Attributes.Name.SPECIFICATION_TITLE); String specVersion = attr.getValue(Attributes.Name.SPECIFICATION_VERSION); ...
return definePackage(name, specTitle, specVersion, specVendor, implTitle, implVersion, implVendor, url);
return definePackage(name, specTitle, specVendor, specVersion, implTitle, implVendor, implVersion, url);
protected Package definePackage(String name, Manifest manifest, URL url) throws IllegalArgumentException { Attributes attr = manifest.getMainAttributes(); String specTitle = attr.getValue(Attributes.Name.SPECIFICATION_TITLE); String specVersion = attr.getValue(Attributes.Name.SPECIFICATION_VERSION); ...
super.setSigners(result, resource.getCertificates());
Certificate[] resourceCertificates = resource.getCertificates(); if(resourceCertificates != null) super.setSigners(result, resourceCertificates);
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFou...
synchronized (urlloaders)
synchronized (this)
public String toString() { synchronized (urlloaders) { if (thisString == null) { StringBuffer sb = new StringBuffer(); sb.append(this.getClass().getName()); sb.append("{urls=[" ); URL[] thisURLs = getURLs(); for (int i = 0; i < thisURLs.length; i++) { sb.append(thisURLs[i]); if ...
public ObjectEmitter(AbstractVmClassLoader b, NativeStream os, PrintWriter debug, Set legalInstanceClasses) {
public ObjectEmitter(VmClassLoader b, NativeStream os, PrintWriter debug, Set legalInstanceClasses) {
public ObjectEmitter(AbstractVmClassLoader b, NativeStream os, PrintWriter debug, Set legalInstanceClasses) { this.loaderContext = b; this.os = os; this.bis = (BootImageNativeStream)os; this.legalInstanceClasses = legalInstanceClasses; this.debugWriter = debug; }
cdrBufOutput buffer = new cdrBufOutput();
BufferedCdrOutput buffer = new BufferedCdrOutput();
public static void invoke(ServerRequest request, InvokeHandler target, Streamable result ) { try { int IN = ARG_IN.value; int OUT = ARG_OUT.value; // Write all arguments to the buffer output stream. cdrBufOutput buffer = new cdr...
universalHolder uku = new universalHolder(h.reply);
GeneralHolder uku = new GeneralHolder(h.reply);
public static void invoke(ServerRequest request, InvokeHandler target, Streamable result ) { try { int IN = ARG_IN.value; int OUT = ARG_OUT.value; // Write all arguments to the buffer output stream. cdrBufOutput buffer = new cdr...
r.insert_Streamable(new streamReadyHolder(in));
r.insert_Streamable(new StreamHolder(in));
public static void invoke(ServerRequest request, InvokeHandler target, Streamable result ) { try { int IN = ARG_IN.value; int OUT = ARG_OUT.value; // Write all arguments to the buffer output stream. cdrBufOutput buffer = new cdr...
if (Configuration.DEBUG)
void start() throws Exception { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ String jarFileName = main.getJarFileName(); jarFile = new JarFile(jarFileName); // 1. find all signature (.SF) files List sfFiles = new ArrayList(); for (Enumeration e = jarFile.entries(); e.hasMoreEleme...
log.finest("About to verify signature of " + sigFileName + "...");
log.fine("About to verify signature of " + sigFileName + "..."); }
private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering(this.getClass().getName(), "verifySF"); //$NON-NLS-1$ log.finest("About to verify signature of " + sigFileName + "..."); //$NON-NLS-1$ //$NON-NLS-2$ // 1. find the correspond...
log.finest("\n" + Util.dumpString(encryptedDigest, "--- signedSFBytes "));
if (Configuration.DEBUG) log.fine("\n" + Util.dumpString(encryptedDigest, "--- signedSFBytes "));
private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering(this.getClass().getName(), "verifySF"); //$NON-NLS-1$ log.finest("About to verify signature of " + sigFileName + "..."); //$NON-NLS-1$ //$NON-NLS-2$ // 1. find the correspond...
log.finest("--- verifier public key = " + verifierKey);
if (Configuration.DEBUG) log.fine("--- verifier public key = " + verifierKey);
private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering(this.getClass().getName(), "verifySF"); //$NON-NLS-1$ log.finest("About to verify signature of " + sigFileName + "..."); //$NON-NLS-1$ //$NON-NLS-2$ // 1. find the correspond...
log.finer("Signature block [" + sigFileName + "] is "
if (Configuration.DEBUG) { log.fine("Signature block [" + sigFileName + "] is "
private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering(this.getClass().getName(), "verifySF"); //$NON-NLS-1$ log.finest("About to verify signature of " + sigFileName + "..."); //$NON-NLS-1$ //$NON-NLS-2$ // 1. find the correspond...
}
private boolean verifySF(String sigFileName) throws CRLException, CertificateException, ZipException, IOException { log.entering(this.getClass().getName(), "verifySF"); //$NON-NLS-1$ log.finest("About to verify signature of " + sigFileName + "..."); //$NON-NLS-1$ //$NON-NLS-2$ // 1. find the correspond...
log.exiting(this.getClass().getName(), "verifySFEntries", Boolean.valueOf(result));
if (Configuration.DEBUG) log.exiting(this.getClass().getName(), "verifySFEntries", Boolean.valueOf(result));
private boolean verifySFEntries(String alias) throws IOException { log.entering(this.getClass().getName(), "verifySFEntries"); //$NON-NLS-1$ // 1. read the signature file JarEntry jarEntry = jarFile.getJarEntry(JarUtils.META_INF + alias + JarUtils.SF_SUFFIX); In...
log.finest("Is " + name + " OK? " + result);
if (Configuration.DEBUG) log.fine("Is " + name + " OK? " + result);
private boolean verifySFEntry(String name, String hash) throws IOException { String expectedValue = getEntryHash(JarFile.MANIFEST_NAME); boolean result = expectedValue.equalsIgnoreCase(hash); log.finest("Is " + name + " OK? " + result); //$NON-NLS-1$ //$NON-NLS-2$ return result; }
if (Configuration.DEBUG)
String hashStream(InputStream stream) throws IOException { BufferedInputStream bis = new BufferedInputStream(stream, 4096); byte[] buffer = new byte[4096]; int count = 0; int n; while ((n = bis.read(buffer)) != - 1) if (n > 0) { sha.update(buffer, 0, n); count += n; ...
{
public PrivateKey decodePrivateKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0] || k[1] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[1] || k[2] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[2] || k[3] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[3]) { throw new IllegalArgum...
}
public PrivateKey decodePrivateKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0] || k[1] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[1] || k[2] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[2] || k[3] != Registry.MAGIC_RAW_DSS_PRIVATE_KEY[3]) { throw new IllegalArgum...
{
public PublicKey decodePublicKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0] || k[1] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[1] || k[2] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[2] || k[3] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[3]) { throw new IllegalArgumentExc...
}
public PublicKey decodePublicKey(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0] || k[1] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[1] || k[2] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[2] || k[3] != Registry.MAGIC_RAW_DSS_PUBLIC_KEY[3]) { throw new IllegalArgumentExc...
if (!(key instanceof DSSPrivateKey)) {
if (! (key instanceof DSSPrivateKey))
public byte[] encodePrivateKey(PrivateKey key) { if (!(key instanceof DSSPrivateKey)) { throw new IllegalArgumentException("key"); } DSSPrivateKey dssKey = (DSSPrivateKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_DSS_PRIVATE...
}
public byte[] encodePrivateKey(PrivateKey key) { if (!(key instanceof DSSPrivateKey)) { throw new IllegalArgumentException("key"); } DSSPrivateKey dssKey = (DSSPrivateKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_DSS_PRIVATE...
if (!(key instanceof DSSPublicKey)) {
if (! (key instanceof DSSPublicKey))
public byte[] encodePublicKey(PublicKey key) { if (!(key instanceof DSSPublicKey)) { throw new IllegalArgumentException("key"); } DSSPublicKey dssKey = (DSSPublicKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0...
}
public byte[] encodePublicKey(PublicKey key) { if (!(key instanceof DSSPublicKey)) { throw new IllegalArgumentException("key"); } DSSPublicKey dssKey = (DSSPublicKey) key; ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW_DSS_PUBLIC_KEY[0...
if (fsv.getParentDirectory(currentDir) != null)
public void changeToParentDirectory() { setCurrentDirectory(fsv.getParentDirectory(currentDir)); }
throws NotImplementedException
public void deleteChar (AttributedCharacterIterator newParagraph, int deletePos) { throw new Error ("not implemented"); }
throws NotImplementedException
public float getAdvanceBetween (int start, int limit) { throw new Error ("not implemented"); }
throws NotImplementedException
public TextLayout getLayout (int start, int limit) { throw new Error ("not implemented"); }
throws NotImplementedException
public int getLineBreakIndex (int start, float maxAdvance) { throw new Error ("not implemented"); }
throws NotImplementedException
public void insertChar (AttributedCharacterIterator newParagraph, int insertPos) { throw new Error ("not implemented"); }
public void bind(SocketAddress bindpoint) throws IOException { if (closed) throw new SocketException("Socket is closed");
public void bind(SocketAddress bindpoint) throws IOException { if (isClosed()) throw new SocketException("socket is closed");
public void bind(SocketAddress bindpoint) throws IOException { if (closed) throw new SocketException("Socket is closed"); if (!(bindpoint instanceof InetSocketAddress)) throw new IllegalArgumentException(); InetSocketAddress tmp = (InetSocketAddress)bindpoint; impl.bind(tmp.getAddress(), tmp.getPort()); }
if (!(bindpoint instanceof InetSocketAddress))
if (bindpoint == null) bindpoint = new InetSocketAddress(InetAddress.ANY_IF, 0); if (! (bindpoint instanceof InetSocketAddress))
public void bind(SocketAddress bindpoint) throws IOException { if (closed) throw new SocketException("Socket is closed"); if (!(bindpoint instanceof InetSocketAddress)) throw new IllegalArgumentException(); InetSocketAddress tmp = (InetSocketAddress)bindpoint; impl.bind(tmp.getAddress(), tmp.getPort()); }
InetSocketAddress tmp = (InetSocketAddress)bindpoint; impl.bind(tmp.getAddress(), tmp.getPort());
InetSocketAddress tmp = (InetSocketAddress) bindpoint; try { getImpl().bind(tmp.getAddress(), tmp.getPort()); bound = true; } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; }
public void bind(SocketAddress bindpoint) throws IOException { if (closed) throw new SocketException("Socket is closed"); if (!(bindpoint instanceof InetSocketAddress)) throw new IllegalArgumentException(); InetSocketAddress tmp = (InetSocketAddress)bindpoint; impl.bind(tmp.getAddress(), tmp.getPort()); }
public void connect(SocketAddress endpoint) throws IOException { if (closed) throw new SocketException("Socket is closed"); if (!(endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("Address type not supported"); if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException(); imp...
public void connect(SocketAddress endpoint) throws IOException { connect(endpoint, 0);
public void connect(SocketAddress endpoint) throws IOException { if (closed) throw new SocketException("Socket is closed"); if (!(endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("Address type not supported"); if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException...
public SocketChannel getChannel() { return ch;
public SocketChannel getChannel() { return null;
public SocketChannel getChannel() { return ch; }
public boolean getKeepAlive() throws SocketException { if (impl == null) throw new SocketException("Not connected");
public boolean getKeepAlive() throws SocketException { if (isClosed()) throw new SocketException("socket is closed");
public boolean getKeepAlive() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_KEEPALIVE); if (buf instanceof Boolean) return (((Boolean)buf).booleanValue()); else throw new SocketException("Internal Error: Unexpected type"); ...
Object buf = impl.getOption(SocketOptions.SO_KEEPALIVE);
Object buf = getImpl().getOption(SocketOptions.SO_KEEPALIVE);
public boolean getKeepAlive() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_KEEPALIVE); if (buf instanceof Boolean) return (((Boolean)buf).booleanValue()); else throw new SocketException("Internal Error: Unexpected type"); ...
public InetAddress getLocalAddress() { if (impl == null) return null;
public InetAddress getLocalAddress() { if (! isBound()) return InetAddress.ANY_IF;
public InetAddress getLocalAddress() { if (impl == null) return null; InetAddress addr = null; try { addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); } catch (SocketException e) { // (hopefully) shouldn't happen // throw new java.lang.InternalError // ("Error in PlainSocketImpl.getOpti...
try { addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); } catch (SocketException e) {
try { addr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); } catch (SocketException e) {
public InetAddress getLocalAddress() { if (impl == null) return null; InetAddress addr = null; try { addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); } catch (SocketException e) { // (hopefully) shouldn't happen // throw new java.lang.InternalError // ("Error in PlainSocketImpl.getOpti...
public int getLocalPort() { if (impl != null) return impl.getLocalPort();
public int getLocalPort() { if (! isBound()) return -1; try { if (getImpl() != null) return getImpl().getLocalPort(); } catch (SocketException e) { }
public int getLocalPort() { if (impl != null) return impl.getLocalPort(); return -1; }
public SocketAddress getLocalSocketAddress() {
public SocketAddress getLocalSocketAddress() { if (! isBound()) return null;
public SocketAddress getLocalSocketAddress() { InetAddress addr = getLocalAddress(); if (addr == null) return null; return new InetSocketAddress(addr, impl.getLocalPort()); }
if (addr == null)
try { return new InetSocketAddress(addr, getImpl().getLocalPort()); } catch (SocketException e) {
public SocketAddress getLocalSocketAddress() { InetAddress addr = getLocalAddress(); if (addr == null) return null; return new InetSocketAddress(addr, impl.getLocalPort()); }
return new InetSocketAddress(addr, impl.getLocalPort());
}
public SocketAddress getLocalSocketAddress() { InetAddress addr = getLocalAddress(); if (addr == null) return null; return new InetSocketAddress(addr, impl.getLocalPort()); }
public boolean getOOBInline() throws SocketException { if (impl == null) throw new SocketException("Not connected");
public boolean getOOBInline() throws SocketException { if (isClosed()) throw new SocketException("socket is closed");
public boolean getOOBInline() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_OOBINLINE); if (buf instanceof Boolean) return (((Boolean)buf).booleanValue()); else throw new SocketException("Internal Error: Unexpected type"); ...
Object buf = impl.getOption(SocketOptions.SO_OOBINLINE);
Object buf = getImpl().getOption(SocketOptions.SO_OOBINLINE);
public boolean getOOBInline() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_OOBINLINE); if (buf instanceof Boolean) return (((Boolean)buf).booleanValue()); else throw new SocketException("Internal Error: Unexpected type"); ...
public int getPort() { if (impl != null) return impl.getPort();
public int getPort() { if (! isConnected()) return 0;
public int getPort() { if (impl != null) return impl.getPort(); return -1; }
return -1;
try { return getImpl().getPort(); } catch (SocketException e) { } return 0;
public int getPort() { if (impl != null) return impl.getPort(); return -1; }
public int getReceiveBufferSize() throws SocketException { if (impl == null) throw new SocketException("Not connected");
public int getReceiveBufferSize() throws SocketException { if (isClosed()) throw new SocketException("socket is closed");
public int getReceiveBufferSize() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_RCVBUF); if (buf instanceof Integer) return (((Integer)buf).intValue()); else throw new SocketException("Internal Error: Unexpected type"); }
Object buf = impl.getOption(SocketOptions.SO_RCVBUF);
Object buf = getImpl().getOption(SocketOptions.SO_RCVBUF);
public int getReceiveBufferSize() throws SocketException { if (impl == null) throw new SocketException("Not connected"); Object buf = impl.getOption(SocketOptions.SO_RCVBUF); if (buf instanceof Integer) return (((Integer)buf).intValue()); else throw new SocketException("Internal Error: Unexpected type"); }
return new InetSocketAddress(impl.getInetAddress(), impl.getPort());
try { return new InetSocketAddress(getImpl().getInetAddress(), getImpl().getPort()); } catch (SocketException e) { return null; }
public SocketAddress getRemoteSocketAddress() { if (!isConnected()) return null; return new InetSocketAddress(impl.getInetAddress(), impl.getPort()); }