rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public String nextToken() throws NoSuchElementException | public String nextToken(String delim) throws NoSuchElementException | public String nextToken() throws NoSuchElementException { if (pos < len && delim.indexOf(str.charAt(pos)) >= 0) { if (retDelims) return str.substring(pos, ++pos); while (++pos < len && delim.indexOf(str.charAt(pos)) >= 0); } if (pos < len) { int start = pos; while (++pos < len && delim.in... |
if (pos < len && delim.indexOf(str.charAt(pos)) >= 0) { if (retDelims) return str.substring(pos, ++pos); while (++pos < len && delim.indexOf(str.charAt(pos)) >= 0); } if (pos < len) { int start = pos; while (++pos < len && delim.indexOf(str.charAt(pos)) < 0); return str.substring(start, pos); } throw new NoSuchElement... | this.delim = delim; return nextToken(); | public String nextToken() throws NoSuchElementException { if (pos < len && delim.indexOf(str.charAt(pos)) >= 0) { if (retDelims) return str.substring(pos, ++pos); while (++pos < len && delim.indexOf(str.charAt(pos)) >= 0); } if (pos < len) { int start = pos; while (++pos < len && delim.in... |
public ClassNotFoundException(String s) | public ClassNotFoundException() | public ClassNotFoundException(String s) { this(s, null); } |
this(s, null); | this(null); | public ClassNotFoundException(String s) { this(s, null); } |
textComponent.setBackground(defaults.getColor(prefix + ".background")); textComponent.setForeground(defaults.getColor(prefix + ".foreground")); | protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHigh... | |
background = defaults.getColor(prefix + ".background"); inactiveBackground = defaults.getColor(prefix + ".inactiveBackground"); textComponent.setForeground(defaults.getColor(prefix + ".foreground")); textComponent.setDisabledTextColor (defaults.getColor(prefix + ".inactiveForeground")); | protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHigh... | |
if (textComponent.isEditable()) textComponent.setBackground(background); else textComponent.setBackground(inactiveBackground); | protected void paintBackground(Graphics g) { g.setColor(textComponent.getBackground()); g.fillRect(0, 0, textComponent.getWidth(), textComponent.getHeight()); } | |
Ext2Debugger.debug("FSEntryIterator()",2); | log.debug("FSEntryIterator()"); | public FSEntryIterator(INode iNode) { //this.iNode = iNode; lastBlockIndex = -1; blockIndex = 0; //the byte index where the directory parsing has reached index=0; //the Ext2DirectoryRecord that has been read last current = null; Ext2Debugger.debug("FSEntryIterator()",2); } |
Ext2Debugger.debug("FSEntryIterator.hasNext()",3); | log.debug("FSEntryIterator.hasNext()"); | public boolean hasNext() { Ext2Debugger.debug("FSEntryIterator.hasNext()",3); if(noMoreEntries) return false; if(index>=iNode.getSize()) return false; //read the inode number of the next entry: blockIndex = Ext2Directory.this.translateToBlock( index ); blockOffset= Ext2Directory.this.translat... |
Ext2Debugger.debug("FSEntryIterator.hasNext(): null inode",2); | log.debug("FSEntryIterator.hasNext(): null inode"); | public boolean hasNext() { Ext2Debugger.debug("FSEntryIterator.hasNext()",3); if(noMoreEntries) return false; if(index>=iNode.getSize()) return false; //read the inode number of the next entry: blockIndex = Ext2Directory.this.translateToBlock( index ); blockOffset= Ext2Directory.this.translat... |
Ext2Debugger.debug("FSEntryIterator.next()",2); | log.debug("FSEntryIterator.next()"); | public Object next() { Ext2Debugger.debug("FSEntryIterator.next()",2); if(current == null) { //hasNext actually reads the next element if(!hasNext()) throw new NoSuchElementException(); } Ext2DirectoryRecord dr = current; current = null; try{ return new Ext2Entry( ((Ext2FileSystem)getFi... |
Ext2Debugger.debug("Ext2Directory.Iterator()",2); | log.debug("Ext2Directory.Iterator()"); | public Iterator iterator() { Ext2Debugger.debug("Ext2Directory.Iterator()",2); return new FSEntryIterator(iNode); } |
public UnsupportedOperationException(String s) { super(s); | public UnsupportedOperationException() { | public UnsupportedOperationException(String s) { super(s); } |
public Object copyObject(Object obj, javax.rmi.ORB orb) | public Object copyObject(Object obj, ORB orb) | public Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | if (obj instanceof String) return obj; else if (obj == null) return null; else if (obj instanceof String[] || obj instanceof String[][] || obj instanceof String[][][]) { return ((Object[]) obj).clone(); } else if (obj instanceof Serializable) { try { ByteArrayOutputStream a = new ByteArrayOutputStream(); ObjectOutputS... | public Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for UtilDelegate"); } |
public Object[] copyObjects(Object obj[], javax.rmi.ORB orb) | public Object[] copyObjects(Object[] obj, ORB orb) | public Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | return (Object[]) copyObject(obj, orb); | public Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | if (m_ValueHandler == null) m_ValueHandler = (ValueHandler) DelegateFactory.getInstance(DelegateFactory.VALUEHANDLER); return m_ValueHandler; | public ValueHandler createValueHandler() { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | return RMIClassLoader.getClassAnnotation(clz); | public String getCodebase(Class clz) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | synchronized (m_Targets) { Tie tie; TieTargetRecord r = ((TieTargetRecord) m_Targets.get(target)); if (r == null) { if (target instanceof Stub) { tie = StubDelegateImpl.getTieFromStub(target); registerTarget(tie, target); } else { String tieClassName = getTieClassName(target.getClass().getName()); try { Class tieClass... | public Tie getTie(Remote target) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | try { return stub._is_local(); } catch (SystemException e) { RemoteException rex = new RemoteException(); rex.initCause(e); throw rex; } | public boolean isLocal(Stub stub) throws RemoteException { throw new Error("Not implemented for UtilDelegate"); } |
try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else | if (loader == null) loader = Thread.currentThread().getContextClassLoader(); String p_useCodebaseOnly = System.getProperty("java.rmi.server.useCodebaseOnly"); boolean useCodebaseOnly = p_useCodebaseOnly != null && p_useCodebaseOnly.trim().equalsIgnoreCase("true"); try { if (remoteCodebase != null && !useCodebaseOnly... | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... |
catch (MalformedURLException e1) | catch (Exception e) | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... |
throw new ClassNotFoundException(className, e1); | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... | |
catch(ClassNotFoundException e2) | try | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... |
if(loader != null) return loader.loadClass(className); else return null; | if (remoteCodebase == null || useCodebaseOnly) return RMIClassLoader.loadClass(remoteCodebase, className); | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... |
catch (Exception e) { } if (loader != null) return Class.forName(className, true, loader); throw new ClassNotFoundException(className + " at " + remoteCodebase); | public Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { try{ if (remoteCodebase == null) return RMIClassLoader.loadClass(className); else return RMIClassLoader.loadClass(remoteCodebase, className); } catch (MalformedURLException e... | |
throw new Error("Not implemented for UtilDelegate"); | RemoteException rex; String status; switch (ex.completed.value()) { case CompletionStatus._COMPLETED_MAYBE: status = "Maybe"; break; case CompletionStatus._COMPLETED_NO: status = "No"; break; case CompletionStatus._COMPLETED_YES: status = "Yes"; break; default: status = "Unexpected completion status " + ex.complet... | public RemoteException mapSystemException(SystemException ex) { throw new Error("Not implemented for UtilDelegate"); } |
String name = ex.getClass().getName(); if (name.startsWith(m_StandardPackage)) name = name.substring(m_StandardPackage.length()); String message = "CORBA " + name + " 0x" + Integer.toHexString(ex.minor) + " " + status; if (ex instanceof COMM_FAILURE) rex = new MarshalException(message, ex); else if (ex instanceof IN... | public RemoteException mapSystemException(SystemException ex) { throw new Error("Not implemented for UtilDelegate"); } | |
public Object readAny(InputStream in) | public Object readAny(InputStream input) | public Object readAny(InputStream in) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | return input.read_any(); | public Object readAny(InputStream in) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | synchronized (m_Ties) { synchronized (m_Targets) { TieTargetRecord r = (TieTargetRecord) m_Ties.get(tie); if (r == null) { r = new TieTargetRecord(tie); m_Ties.put(tie, r); } if (target != null) { r.add(target); m_Targets.put(target, r); | public void registerTarget(Tie tie, Remote target) { throw new Error("Not implemented for UtilDelegate"); } |
} } } | public void registerTarget(Tie tie, Remote target) { throw new Error("Not implemented for UtilDelegate"); } | |
throw new Error("Not implemented for UtilDelegate"); | synchronized (m_Ties) { synchronized (m_Targets) { TieTargetRecord r = ((TieTargetRecord) m_Targets.get(target)); if (r != null) { if (target instanceof org.omg.CORBA.Object) r.tie.orb().disconnect((org.omg.CORBA.Object) target); if (r.unused()) { m_Targets.remove(target); m_Ties.remove(r.tie); r.tie.deactivate(); if... | public void unexportObject(Remote target) { throw new Error("Not implemented for UtilDelegate"); } |
public RemoteException wrapException(Throwable orig) | public RemoteException wrapException(Throwable ex) throws RuntimeException | public RemoteException wrapException(Throwable orig) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | if (ex instanceof RuntimeException) throw (RuntimeException) ex; else if (ex instanceof Error) return new ServerError(ex.getMessage(), (Error) ex); else if (ex instanceof RemoteException) return new ServerException(ex.getMessage(), (Exception) ex); else if (ex instanceof SystemException) return wrapException(mapSystemE... | public RemoteException wrapException(Throwable orig) { throw new Error("Not implemented for UtilDelegate"); } |
public void writeAbstractObject(OutputStream out, Object obj) | public void writeAbstractObject(OutputStream output, Object object) | public void writeAbstractObject(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | ((org.omg.CORBA_2_3.portable.OutputStream) output).write_abstract_interface(object); | public void writeAbstractObject(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
public void writeAny(OutputStream out, Object obj) | public void writeAny(OutputStream output, Object object) | public void writeAny(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | Any any = output.orb().create_any(); if (object == null) { generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface); t.setId("IDL:omg.org/CORBA/AbstractBase:1.0"); t.setName(""); any.type(t); output.write_any(any); return; } else if (object instanceof org.omg.CORBA.Object && !(object instanceof Remote)) { ... | public void writeAny(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
public void writeRemoteObject(OutputStream out, Object obj) | public void writeRemoteObject(OutputStream an_output, Object object) | public void writeRemoteObject(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
throw new Error("Not implemented for UtilDelegate"); | org.omg.CORBA_2_3.portable.OutputStream output = (org.omg.CORBA_2_3.portable.OutputStream) an_output; if (object == null) an_output.write_Object(null); else if (isTieRequired(object)) { Class fc = getExportedInterface(object); exportTie(output, object, fc); } else if (object instanceof org.omg.CORBA.Object) { ensureO... | public void writeRemoteObject(OutputStream out, Object obj) { throw new Error("Not implemented for UtilDelegate"); } |
public static synchronized Object getInstance(String type) throws GetDelegateInstanceException | public static Object getInstance(String type) throws InternalError | public static synchronized Object getInstance(String type) throws GetDelegateInstanceException { Object r = cache.get(type); if (r != null) return r; String dcname = System.getProperty("javax.rmi.CORBA." + type + "Class"); if (dcname == null) { //throw new DelegateException // ("no javax.rm... |
Object r = cache.get(type); if (r != null) return r; String dcname = System.getProperty("javax.rmi.CORBA." + type + "Class"); | String propertyName = "javax.rmi.CORBA." + type + "Class"; String dcname = System.getProperty(propertyName); | public static synchronized Object getInstance(String type) throws GetDelegateInstanceException { Object r = cache.get(type); if (r != null) return r; String dcname = System.getProperty("javax.rmi.CORBA." + type + "Class"); if (dcname == null) { //throw new DelegateException // ("no javax.rm... |
Class dclass = Class.forName(dcname, true, Thread.currentThread().getContextClassLoader()); r = dclass.newInstance(); cache.put(type, r); return r; | Class dclass = ObjectCreator.forName(dcname); return dclass.newInstance(); | public static synchronized Object getInstance(String type) throws GetDelegateInstanceException { Object r = cache.get(type); if (r != null) return r; String dcname = System.getProperty("javax.rmi.CORBA." + type + "Class"); if (dcname == null) { //throw new DelegateException // ("no javax.rm... |
throw new GetDelegateInstanceException ("Exception when trying to get delegate instance:" + dcname, e); | InternalError ierr = new InternalError("Exception when trying to get " + type + "delegate instance:" + dcname); ierr.initCause(e); throw ierr; | public static synchronized Object getInstance(String type) throws GetDelegateInstanceException { Object r = cache.get(type); if (r != null) return r; String dcname = System.getProperty("javax.rmi.CORBA." + type + "Class"); if (dcname == null) { //throw new DelegateException // ("no javax.rm... |
if(delegate != null) | public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { if(delegate != null) return delegate.loadClass(className, remoteCodebase, loader); else throw new ClassNotFoundException(className + ": delegate == null"); } | |
else throw new ClassNotFoundException(className + ": delegate == null"); | public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException { if(delegate != null) return delegate.loadClass(className, remoteCodebase, loader); else throw new ClassNotFoundException(className + ": delegate == null"); } | |
public boolean startsWith(String prefix) | public boolean startsWith(String prefix, int toffset) | public boolean startsWith(String prefix) { return regionMatches(false, 0, prefix, 0, prefix.count); } |
return regionMatches(false, 0, prefix, 0, prefix.count); | return regionMatches(false, toffset, prefix, 0, prefix.count); | public boolean startsWith(String prefix) { return regionMatches(false, 0, prefix, 0, prefix.count); } |
void unexportObject(Remote target); | void unexportObject(Remote target) throws NoSuchObjectException; | void unexportObject(Remote target); |
javax.rmi.ORB orb(); | ORB orb(); | javax.rmi.ORB orb(); |
void deactivate(); | void deactivate() throws NoSuchObjectException; | void deactivate(); |
Class helperClass = Class.forName(helperClassName); | Class helperClass = forName(helperClassName); | public static boolean insertWithHelper(Any into, Object object) { try { String helperClassName = object.getClass().getName() + "Helper"; Class helperClass = Class.forName(helperClassName); Method insert = helperClass.getMethod("insert", new Class[] { Any.class, object... |
public abstract void insert_Value(Serializable x); | public abstract void insert_Value(Serializable x, TypeCode typecode); | public abstract void insert_Value(Serializable x); |
(Frame)me.frame); | (Frame)me.getParentView((Session)this)); | private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.frame); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultP... |
XTFRFile xtrf = new XTFRFile(me.frame,vt); | XTFRFile xtrf = new XTFRFile(me.getParentView((Session)this),vt); | private void doMeTransfer() { XTFRFile xtrf = new XTFRFile(me.frame,vt); } |
kc = new KeyConfigure(me.frame,macrosList,vt.getCodePage()); | kc = new KeyConfigure(me.getParentView((Session)this),macrosList,vt.getCodePage()); | private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.frame,macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.frame,null,vt.getCodePage()); } |
kc = new KeyConfigure(me.frame,null,vt.getCodePage()); | kc = new KeyConfigure(me.getParentView((Session)this),null,vt.getCodePage()); | private void mapMeKeys() { KeyConfigure kc; if (macros.isMacrosExist()) { String[] macrosList = macros.getMacroList(); kc = new KeyConfigure(me.frame,macrosList,vt.getCodePage()); } else kc = new KeyConfigure(me.frame,null,vt.getCodePage()); } |
SendEMailDialog semd = new SendEMailDialog(me.frame,screen); | SendEMailDialog semd = new SendEMailDialog(me.getParentView((Session)this),screen); | private void sendScreenEMail() { SendEMailDialog semd = new SendEMailDialog(me.frame,screen); } |
me.frame, | me.getParentView((Session)this), | private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.g... |
public String toLowerCase() | public String toLowerCase(Locale loc) | public String toLowerCase() { return toLowerCase(Locale.getDefault()); } |
return toLowerCase(Locale.getDefault()); | boolean turkish = "tr".equals(loc.getLanguage()); int i = count; int x = offset - 1; while (--i >= 0) { char ch = value[++x]; if ((turkish && ch == '\u0049') || ch != Character.toLowerCase(ch)) break; } if (i < 0) return this; char[] newStr = (char[]) value.clone(); do { char ch = value[x]; newStr[x++] = (turkish &... | public String toLowerCase() { return toLowerCase(Locale.getDefault()); } |
public int indexOf(String str) | public int indexOf(int ch) | public int indexOf(String str) { return indexOf(str, 0); } |
return indexOf(str, 0); | return indexOf(ch, 0); | public int indexOf(String str) { return indexOf(str, 0); } |
public final static String getKeyStrokeText(KeyEvent ke,boolean isAltGr) { if (!workStroke.equals(ke,isAltGr)) { workStroke.setAttributes(ke,isAltGr); | public final static String getKeyStrokeText(KeyEvent ke) { if (!workStroke.equals(ke)) { workStroke.setAttributes(ke); | public final static String getKeyStrokeText(KeyEvent ke,boolean isAltGr) { if (!workStroke.equals(ke,isAltGr)) { workStroke.setAttributes(ke,isAltGr); lastKeyMnemonic = (String)mappedKeys.get(workStroke); } return lastKeyMnemonic; } |
System.out.println("getKeyStrokeText " + lastKeyMnemonic); | public final static String getKeyStrokeText(KeyEvent ke,boolean isAltGr) { if (!workStroke.equals(ke,isAltGr)) { workStroke.setAttributes(ke,isAltGr); lastKeyMnemonic = (String)mappedKeys.get(workStroke); } return lastKeyMnemonic; } | |
return matched.length() == 0 ? ((match.group(group - 1).length() == 0) ? null : "") : matched; | if (matched == null || matched.length() == 0) { String prevMatched = match.group(group -1); if (prevMatched == null || prevMatched.length() == 0) return null; else return ""; } return matched; | private static String getURIGroup(Matcher match, int group) { String matched = match.group(group); return matched.length() == 0 ? ((match.group(group - 1).length() == 0) ? null : "") : matched; } |
public static String valueOf(int i) | public static String valueOf(Object obj) | public static String valueOf(int i) { // See Integer to understand why we call the two-arg variant. return Integer.toString(i, 10); } |
return Integer.toString(i, 10); | return obj == null ? "null" : obj.toString(); | public static String valueOf(int i) { // See Integer to understand why we call the two-arg variant. return Integer.toString(i, 10); } |
public byte[] getBytes(String enc) throws UnsupportedEncodingException | public void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin) | public byte[] getBytes(String enc) throws UnsupportedEncodingException { try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); i... |
try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); if(bbuf.hasArray()) return bbuf.array(); byte[] bytes = new byte[bbuf.remaining()]; ... | if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new StringIndexOutOfBoundsException(); int i = srcEnd - srcBegin; srcBegin += offset; while (--i >= 0) dst[dstBegin++] = (byte) value[srcBegin++]; | public byte[] getBytes(String enc) throws UnsupportedEncodingException { try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); i... |
public InternalError(String s) { super(s); | public InternalError() { | public InternalError(String s) { super(s); } |
public synchronized int indexOf(String str, int fromIndex) | public int indexOf(String str) | public synchronized int indexOf(String str, int fromIndex) { if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; } |
if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; | return indexOf(str, 0); | public synchronized int indexOf(String str, int fromIndex) { if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; } |
public synchronized String substring(int beginIndex, int endIndex) | public String substring(int beginIndex) | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Don't copy unless substring is smaller than 1/4 of the ... |
int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; boolean share_buffer = ((len << 2) >= value.length); if (share_buffer) this.shared = true; return new String(value, beginIndex, len, share_buffer); | return substring(beginIndex, count); | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Don't copy unless substring is smaller than 1/4 of the ... |
public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException | public String() | public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException { if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalfor... |
if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalformedInput(CodingErrorAction.REPLACE); csd.onUnmappableCharacter(CodingErrorAction.REPLACE); CharBuffer cbuf = csd.decode(ByteBuffer.wrap... | value = "".value; offset = 0; count = 0; | public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException { if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalfor... |
if ((subElements[j].getComponent()).equals(c)) | MenuElement me = subElements[j]; if (me != null && (me.getComponent()).equals(c)) | public boolean isComponentPartOfCurrentMenu(Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getComponent()).e... |
else if (y > r.y + r.height) return y - (r.y + r.height); | else if (y > r.y + r.height - 1) return y - (r.y + r.height - 1); | int distance(Rectangle r, int x, int y) { if (y < r.y) return r.y - y; else if (y > r.y + r.height) return y - (r.y + r.height); else return 0; } |
public void setRect(Rectangle2D r) { setRect(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } | public abstract void setRect(double x, double y, double w, double h); | public void setRect(Rectangle2D r) { setRect(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } |
calculateTiledPositions(allocated, total, children, offsets, spans, true); | calculateAlignedPositions(allocated, total, children, offsets, spans, true); | public static void calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) { calculateTiledPositions(allocated... |
public void setDividerLocation(int location) | public void setDividerLocation(double proportionalLocation) | public void setDividerLocation(int location) { if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } } |
if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } | if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException("proportion has to be between 0 and 1."); int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); setDividerLocation((int) (proportionalLocation * max)); | public void setDividerLocation(int location) { if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } } |
public PlainDatagramSocketImpl() | public PlainDatagramSocketImpl() throws IOException | public PlainDatagramSocketImpl() { } |
channel = new VMChannel(); impl = new VMPlainSocketImpl(channel); | public PlainDatagramSocketImpl() { } | |
throw new SocketException("Not implemented"); | try { impl.bind(new InetSocketAddress(addr, port)); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new SocketException(); se.initCause(ioe); throw se; } | protected synchronized void bind(int port, InetAddress addr) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } |
protected synchronized void close() { throw new RuntimeException("Not implemented"); | protected synchronized void close() { try { if (channel.getState().isValid()) channel.close(); } catch (IOException ioe) { } | protected synchronized void close() { // @vm-specific no natives //TODO implement me throw new RuntimeException("Not implemented"); } |
protected synchronized void create() throws SocketException { throw new SocketException("Not implemented"); | protected synchronized void create() throws SocketException { try { channel.initSocket(false); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new SocketException(); se.initCause(ioe); throw se; } | protected synchronized void create() throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } |
public synchronized Object getOption(int option_id) throws SocketException { throw new SocketException("Not implemented"); | public synchronized Object getOption(int optionId) throws SocketException { if (optionId == SO_BINDADDR) { try { InetSocketAddress local = channel.getLocalAddress(); if (local == null) return null; return local.getAddress(); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new S... | public synchronized Object getOption(int option_id) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } |
Object obj = getOption(IP_TTL); if (! (obj instanceof Integer)) throw new IOException("Internal Error"); return ((Integer) obj).intValue(); | return impl.getTimeToLive(); | protected synchronized int getTimeToLive() throws IOException { Object obj = getOption(IP_TTL); if (! (obj instanceof Integer)) throw new IOException("Internal Error"); return ((Integer) obj).intValue(); } |
protected synchronized void join(InetAddress addr) throws IOException { throw new SocketException("Not implemented"); | protected synchronized void join(InetAddress addr) throws IOException { impl.join(addr); | protected synchronized void join(InetAddress addr) throws IOException { // @vm-specific no natives throw new SocketException("Not implemented"); } |
throw new InternalError ("PlainDatagramSocketImpl::joinGroup is not implemented"); | if (address == null) throw new NullPointerException(); if (!(address instanceof InetSocketAddress)) throw new SocketException("unknown address type"); impl.joinGroup((InetSocketAddress) address, netIf); | public void joinGroup(SocketAddress address, NetworkInterface netIf) { throw new InternalError ("PlainDatagramSocketImpl::joinGroup is not implemented"); } |
protected synchronized void leave(InetAddress addr) throws IOException { throw new SocketException("Not implemented"); | protected synchronized void leave(InetAddress addr) throws IOException { impl.leave(addr); | protected synchronized void leave(InetAddress addr) throws IOException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } |
throw new InternalError ("PlainDatagramSocketImpl::leaveGroup is not implemented"); | if (address == null) throw new NullPointerException(); if (!(address instanceof InetSocketAddress)) throw new SocketException("unknown address type"); impl.leaveGroup((InetSocketAddress) address, netIf); | public void leaveGroup(SocketAddress address, NetworkInterface netIf) { throw new InternalError ("PlainDatagramSocketImpl::leaveGroup is not implemented"); } |
synchronized(RECEIVE_LOCK) { receive0(packet); } | synchronized(RECEIVE_LOCK) { ByteBuffer buf = ByteBuffer.wrap(packet.getData(), packet.getOffset(), packet.getLength()); SocketAddress addr = null; while (true) { try { addr = channel.receive(buf); break; } catch (SocketTimeoutException ste) { throw ste; } catch (InterruptedIOException iioe) { } } if (addr != null) pa... | protected void receive(DatagramPacket packet) throws IOException { synchronized(RECEIVE_LOCK) { receive0(packet); } } |
sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); | ByteBuffer buf = ByteBuffer.wrap(packet.getData(), packet.getOffset(), packet.getLength()); InetAddress remote = packet.getAddress(); int port = packet.getPort(); if (remote == null) throw new NullPointerException(); if (port <= 0) throw new SocketException("invalid port " + port); while (true) { try { channel.send(buf... | protected void send(DatagramPacket packet) throws IOException { synchronized(SEND_LOCK) { sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); } } |
public synchronized void setOption(int option_id, Object val) throws SocketException { throw new SocketException("Not implemented"); | public synchronized void setOption(int optionId, Object value) throws SocketException { switch (optionId) { case IP_MULTICAST_IF: case IP_MULTICAST_IF2: impl.setMulticastInterface(optionId, (InetAddress) value); break; case IP_MULTICAST_LOOP: case SO_BROADCAST: case SO_KEEPALIVE: case SO_OOBINLINE: case TCP_NODELAY: c... | public synchronized void setOption(int option_id, Object val) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } |
setOption(IP_TTL, new Integer(ttl)); | impl.setTimeToLive(ttl); | protected synchronized void setTimeToLive(int ttl) throws IOException { setOption(IP_TTL, new Integer(ttl)); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.