bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
| 13,955
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
| 13,956
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
| 13,957
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response while(true) { response = readResponse(connection.getInputStream()); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
| 13,958
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100 && expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
|
public Response dispatch() throws IOException { if (dispatched) { throw new ProtocolException("request already dispatched"); } final String CRLF = "\r\n"; final String HEADER_SEP = ": "; final String US_ASCII = "US-ASCII"; final String version = connection.getVersion(); Response response; int contentLength = -1; boolean retry = false; int attempts = 0; boolean expectingContinue = false; if (requestBodyWriter != null) { contentLength = requestBodyWriter.getContentLength(); if (contentLength > requestBodyNegotiationThreshold) { expectingContinue = true; setHeader("Expect", "100-continue"); } else { setHeader("Content-Length", Integer.toString(contentLength)); } } try { // Loop while authentication fails or continue do { retry = false; // Send request connection.fireRequestEvent(RequestEvent.REQUEST_SENDING, this); // Get socket output and input streams OutputStream out = connection.getOutputStream(); LineInputStream in = new LineInputStream(connection.getInputStream()); // Request line String requestUri = path; if (connection.isUsingProxy() && !"*".equals(requestUri) && !"CONNECT".equals(method)) { requestUri = getRequestURI(); } String line = method + ' ' + requestUri + ' ' + version + CRLF; out.write(line.getBytes(US_ASCII)); // Request headers for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext(); ) { String name =(String) i.next(); String value =(String) requestHeaders.get(name); line = name + HEADER_SEP + value + CRLF; out.write(line.getBytes(US_ASCII)); } out.write(CRLF.getBytes(US_ASCII)); // Request body if (requestBodyWriter != null && !expectingContinue) { byte[] buffer = new byte[4096]; int len; int count = 0; requestBodyWriter.reset(); do { len = requestBodyWriter.write(buffer); if (len > 0) { out.write(buffer, 0, len); } count += len; } while (len > -1 && count < contentLength); out.write(CRLF.getBytes(US_ASCII)); } out.flush(); // Sent event connection.fireRequestEvent(RequestEvent.REQUEST_SENT, this); // Get response response = readResponse(in); int sc = response.getCode(); if (sc == 401 && authenticator != null) { if (authenticate(response, attempts++)) { retry = true; } } else if (sc == 100) { if (expectingContinue) { requestHeaders.remove("Expect"); setHeader("Content-Length", Integer.toString(contentLength)); expectingContinue = false; retry = true; } } while (retry); } catch (IOException e) { connection.close(); throw e; } return response; }
| 13,959
|
String getNonceCount(String nonce) { int nc = connection.getNonceCount(nonce); String hex = Integer.toHexString(nc); StringBuffer buf = new StringBuffer(); for (int i = 8 - hex.length(); i > 0; i--) { buf.append('0'); } buf.append(hex); return buf.toString(); }
|
String getNonceCount(String nonce) { int nc = connection.getNonceCount(nonce); String hex = Integer.toHexString(nc); StringBuilder buf = new StringBuilder(); for (int i = 8 - hex.length(); i > 0; i--) { buf.append('0'); } buf.append(hex); return buf.toString(); }
| 13,961
|
void handleSetCookie(String text) { CookieManager cookieManager = connection.getCookieManager(); if (cookieManager == null) { return; } String name = null; String value = null; String comment = null; String domain = connection.getHostName(); String path = this.path; int lsi = path.lastIndexOf('/'); if (lsi != -1) { path = path.substring(0, lsi); } boolean secure = false; Date expires = null; int len = text.length(); String attr = null; StringBuffer buf = new StringBuffer(); boolean inQuote = false; for (int i = 0; i <= len; i++) { char c =(i == len) ? '\u0000' : text.charAt(i); if (c == '"') { inQuote = !inQuote; } else if (!inQuote) { if (c == '=' && attr == null) { attr = buf.toString().trim(); buf.setLength(0); } else if (c == ';' || i == len || c == ',') { String val = unquote(buf.toString().trim()); if (name == null) { name = attr; value = val; } else if ("Comment".equalsIgnoreCase(attr)) { comment = val; } else if ("Domain".equalsIgnoreCase(attr)) { domain = val; } else if ("Path".equalsIgnoreCase(attr)) { path = val; } else if ("Secure".equalsIgnoreCase(val)) { secure = true; } else if ("Max-Age".equalsIgnoreCase(attr)) { int delta = Integer.parseInt(val); Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(System.currentTimeMillis()); cal.add(Calendar.SECOND, delta); expires = cal.getTime(); } else if ("Expires".equalsIgnoreCase(attr)) { DateFormat dateFormat = new HTTPDateFormat(); try { expires = dateFormat.parse(val); } catch (ParseException e) { // if this isn't a valid date, it may be that // the value was returned unquoted; in that case, we // want to continue buffering the value buf.append(c); continue; } } attr = null; buf.setLength(0); // case EOL if (i == len || c == ',') { Cookie cookie = new Cookie(name, value, comment, domain, path, secure, expires); cookieManager.setCookie(cookie); } if (c == ',') { // Reset cookie fields name = null; value = null; comment = null; domain = connection.getHostName(); path = this.path; if (lsi != -1) { path = path.substring(0, lsi); } secure = false; expires = null; } } else { buf.append(c); } } else { buf.append(c); } } }
|
void handleSetCookie(String text) { CookieManager cookieManager = connection.getCookieManager(); if (cookieManager == null) { return; } String name = null; String value = null; String comment = null; String domain = connection.getHostName(); String path = this.path; int lsi = path.lastIndexOf('/'); if (lsi != -1) { path = path.substring(0, lsi); } boolean secure = false; Date expires = null; int len = text.length(); String attr = null; StringBuilder buf = new StringBuilder(); boolean inQuote = false; for (int i = 0; i <= len; i++) { char c =(i == len) ? '\u0000' : text.charAt(i); if (c == '"') { inQuote = !inQuote; } else if (!inQuote) { if (c == '=' && attr == null) { attr = buf.toString().trim(); buf.setLength(0); } else if (c == ';' || i == len || c == ',') { String val = unquote(buf.toString().trim()); if (name == null) { name = attr; value = val; } else if ("Comment".equalsIgnoreCase(attr)) { comment = val; } else if ("Domain".equalsIgnoreCase(attr)) { domain = val; } else if ("Path".equalsIgnoreCase(attr)) { path = val; } else if ("Secure".equalsIgnoreCase(val)) { secure = true; } else if ("Max-Age".equalsIgnoreCase(attr)) { int delta = Integer.parseInt(val); Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(System.currentTimeMillis()); cal.add(Calendar.SECOND, delta); expires = cal.getTime(); } else if ("Expires".equalsIgnoreCase(attr)) { DateFormat dateFormat = new HTTPDateFormat(); try { expires = dateFormat.parse(val); } catch (ParseException e) { // if this isn't a valid date, it may be that // the value was returned unquoted; in that case, we // want to continue buffering the value buf.append(c); continue; } } attr = null; buf.setLength(0); // case EOL if (i == len || c == ',') { Cookie cookie = new Cookie(name, value, comment, domain, path, secure, expires); cookieManager.setCookie(cookie); } if (c == ',') { // Reset cookie fields name = null; value = null; comment = null; domain = connection.getHostName(); path = this.path; if (lsi != -1) { path = path.substring(0, lsi); } secure = false; expires = null; } } else { buf.append(c); } } else { buf.append(c); } } }
| 13,962
|
Properties parseAuthParams(String text) { int len = text.length(); String key = null; StringBuffer buf = new StringBuffer(); Properties ret = new Properties(); boolean inQuote = false; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c == '"') { inQuote = !inQuote; } else if (c == '=' && key == null) { key = buf.toString().trim(); buf.setLength(0); } else if (c == ' ' && !inQuote) { String value = unquote(buf.toString().trim()); ret.put(key, value); key = null; buf.setLength(0); } else if (c != ',' || (i <(len - 1) && text.charAt(i + 1) != ' ')) { buf.append(c); } } if (key != null) { String value = unquote(buf.toString().trim()); ret.put(key, value); } return ret; }
|
Properties parseAuthParams(String text) { int len = text.length(); String key = null; StringBuilder buf = new StringBuilder(); Properties ret = new Properties(); boolean inQuote = false; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c == '"') { inQuote = !inQuote; } else if (c == '=' && key == null) { key = buf.toString().trim(); buf.setLength(0); } else if (c == ' ' && !inQuote) { String value = unquote(buf.toString().trim()); ret.put(key, value); key = null; buf.setLength(0); } else if (c != ',' || (i <(len - 1) && text.charAt(i + 1) != ' ')) { buf.append(c); } } if (key != null) { String value = unquote(buf.toString().trim()); ret.put(key, value); } return ret; }
| 13,963
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
|
Response readResponse(InputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
| 13,964
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line LineInputStream lis = new LineInputStream(in); line = lis.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
| 13,965
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(lis); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
| 13,966
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
| 13,967
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
|
Response readResponse(LineInputStream in) throws IOException { String line; int len; // Read response status line line = in.readLine(); if (line == null) { throw new ProtocolException("Peer closed connection"); } if (!line.startsWith("HTTP/")) { throw new ProtocolException(line); } len = line.length(); int start = 5, end = 6; while (line.charAt(end) != '.') { end++; } int majorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 1; while (line.charAt(end) != ' ') { end++; } int minorVersion = Integer.parseInt(line.substring(start, end)); start = end + 1; end = start + 3; int code = Integer.parseInt(line.substring(start, end)); String message = line.substring(end + 1, len - 1); // Read response headers Headers responseHeaders = new Headers(); responseHeaders.parse(in); notifyHeaderHandlers(responseHeaders); // Construct response int codeClass = code / 100; Response ret = new Response(majorVersion, minorVersion, code, codeClass, message, responseHeaders); switch (code) { case 204: case 205: case 304: break; default: // Does response body reader want body? boolean notify = (responseBodyReader != null); if (notify) { if (!responseBodyReader.accept(this, ret)) { notify = false; } } readResponseBody(ret, in, notify); } return ret; }
| 13,968
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName() == "accelerator") { InputMap map = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW); if (map != null) map.remove((KeyStroke)e.getOldValue()); else map = new ComponentInputMapUIResource(menuItem); map.put((KeyStroke)e.getNewValue(), "doClick"); } }
|
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName() == "accelerator") { InputMap map = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW); if (map != null) map.remove((KeyStroke)e.getOldValue()); else map = new ComponentInputMapUIResource(menuItem); KeyStroke accelerator = (KeyStroke) e.getNewValue(); if (accelerator != null) map.put(accelerator, "doClick"); } }
| 13,970
|
protected void installKeyboardActions() { InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW); if (focusedWindowMap == null) focusedWindowMap = new ComponentInputMapUIResource(menuItem); focusedWindowMap.put(menuItem.getAccelerator(), "doClick"); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap); ActionMap UIActionMap = SwingUtilities.getUIActionMap(menuItem); if (UIActionMap == null) UIActionMap = new ActionMapUIResource(); UIActionMap.put("doClick", new ClickAction()); SwingUtilities.replaceUIActionMap(menuItem, UIActionMap); }
|
protected void installKeyboardActions() { InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW); if (focusedWindowMap == null) focusedWindowMap = new ComponentInputMapUIResource(menuItem); KeyStroke accelerator = menuItem.getAccelerator(); if (accelerator != null) focusedWindowMap.put(accelerator, "doClick"); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap); ActionMap UIActionMap = SwingUtilities.getUIActionMap(menuItem); if (UIActionMap == null) UIActionMap = new ActionMapUIResource(); UIActionMap.put("doClick", new ClickAction()); SwingUtilities.replaceUIActionMap(menuItem, UIActionMap); }
| 13,971
|
IfNode(TemplateNode children, TemplateNode next, Expr test) { super(children, next); this.test = test; }
|
IfNode(Expr test) { super(children, next); this.test = test; }
| 13,972
|
IfNode(TemplateNode children, TemplateNode next, Expr test) { super(children, next); this.test = test; }
|
IfNode(TemplateNode children, TemplateNode next, Expr test) { this.test = test; }
| 13,973
|
TemplateNode clone(Stylesheet stylesheet) { return new IfNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), test.clone(stylesheet)); }
|
TemplateNode clone(Stylesheet stylesheet) { return new IfNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), test.clone(stylesheet)); }
| 13,974
|
boolean includeResource(String href, String parse, String xpointer, String encoding, String accept, String acceptLanguage) { included = false; try { if (xpointer != null) throw new XMLStreamException("xpointer attribute not yet supported"); if (href == null || "".equals(href)) href = systemId; else href = XMLParser.absolutize(systemId, href); if (parse == null || "xml".equals(parse)) { seen.clear(); result = null; snapshotIndex = 0; walker = null; current = null; backtracking = false; URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); Document doc = getDocumentBuilder().parse(in, href); DocumentTraversal dt = getDocumentTraversal(doc); if (xpointer == null) { result = null; Node item = doc.getDocumentElement(); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); } else { result = null; snapshotIndex = 0; walker = null; // shorthand or scheme-based? int lpi = xpointer.indexOf('('); int rpi = xpointer.indexOf(')', lpi); if (lpi != -1 && rpi != -1) { String scheme = xpointer.substring(0, lpi); if ("element".equals(scheme)) { // element() scheme String elementSchemeData = xpointer.substring(lpi + 1, rpi); Node item = doc; int si = elementSchemeData.indexOf('/'); if (si == -1) { if (elementSchemeData.length() > 0) item = doc.getElementById(elementSchemeData); } else { if (si > 0) { String context = elementSchemeData.substring(0, si); item = doc.getElementById(context); elementSchemeData = elementSchemeData.substring(si + 1); } StringTokenizer st = new StringTokenizer(elementSchemeData, "/"); while (st.hasMoreTokens() && item != null) { int n = Integer.parseInt(st.nextToken()); Node ctx = item.getFirstChild(); int count = 1; while (ctx != null && count++ < n) ctx = ctx.getNextSibling(); item = ctx; } } walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } else if ("xpointer".equals(scheme)) { xpointer = xpointer.substring(lpi + 1, rpi); XPathEvaluator eval = getXPathEvaluator(doc); XPathNSResolver resolver = eval.createNSResolver(doc); result = (XPathResult) eval.evaluate(xpointer, doc, resolver, XPathResult.ANY_TYPE, null); // TODO xpointer() scheme functions included = true; } else { String msg = "Unknown XPointer scheme: " + scheme; throw new XMLStreamException(msg); } } else { Node item = doc.getElementById(xpointer); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } } } else if ("text".equals(parse)) { URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); if (encoding == null) { encoding = connection.getContentEncoding(); if (encoding == null) { String contentType = connection.getContentType(); if (contentType != null) encoding = getParameter(contentType, "charset"); } } if (encoding == null) includedText = new InputStreamReader(in, "UTF-8"); else includedText = new InputStreamReader(in, encoding); included = true; } else throw new XMLStreamException("value of 'parse' attribute must be "+ "'xml' or 'text'"); return true; } catch (IOException e) { return false; } catch (XMLStreamException e) { return false; } catch (SAXException e) { return false; } }
|
boolean includeResource(String href, String parse, String xpointer, String encoding, String accept, String acceptLanguage) { included = false; try { if (xpointer != null) throw new XMLStreamException("xpointer attribute not yet supported"); if (href == null || "".equals(href)) href = base; else href = XMLParser.absolutize(systemId, href); if (parse == null || "xml".equals(parse)) { seen.clear(); result = null; snapshotIndex = 0; walker = null; current = null; backtracking = false; URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); Document doc = getDocumentBuilder().parse(in, href); DocumentTraversal dt = getDocumentTraversal(doc); if (xpointer == null) { result = null; Node item = doc.getDocumentElement(); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); } else { result = null; snapshotIndex = 0; walker = null; // shorthand or scheme-based? int lpi = xpointer.indexOf('('); int rpi = xpointer.indexOf(')', lpi); if (lpi != -1 && rpi != -1) { String scheme = xpointer.substring(0, lpi); if ("element".equals(scheme)) { // element() scheme String elementSchemeData = xpointer.substring(lpi + 1, rpi); Node item = doc; int si = elementSchemeData.indexOf('/'); if (si == -1) { if (elementSchemeData.length() > 0) item = doc.getElementById(elementSchemeData); } else { if (si > 0) { String context = elementSchemeData.substring(0, si); item = doc.getElementById(context); elementSchemeData = elementSchemeData.substring(si + 1); } StringTokenizer st = new StringTokenizer(elementSchemeData, "/"); while (st.hasMoreTokens() && item != null) { int n = Integer.parseInt(st.nextToken()); Node ctx = item.getFirstChild(); int count = 1; while (ctx != null && count++ < n) ctx = ctx.getNextSibling(); item = ctx; } } walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } else if ("xpointer".equals(scheme)) { xpointer = xpointer.substring(lpi + 1, rpi); XPathEvaluator eval = getXPathEvaluator(doc); XPathNSResolver resolver = eval.createNSResolver(doc); result = (XPathResult) eval.evaluate(xpointer, doc, resolver, XPathResult.ANY_TYPE, null); // TODO xpointer() scheme functions included = true; } else { String msg = "Unknown XPointer scheme: " + scheme; throw new XMLStreamException(msg); } } else { Node item = doc.getElementById(xpointer); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } } } else if ("text".equals(parse)) { URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); if (encoding == null) { encoding = connection.getContentEncoding(); if (encoding == null) { String contentType = connection.getContentType(); if (contentType != null) encoding = getParameter(contentType, "charset"); } } if (encoding == null) includedText = new InputStreamReader(in, "UTF-8"); else includedText = new InputStreamReader(in, encoding); included = true; } else throw new XMLStreamException("value of 'parse' attribute must be "+ "'xml' or 'text'"); return true; } catch (IOException e) { return false; } catch (XMLStreamException e) { return false; } catch (SAXException e) { return false; } }
| 13,975
|
boolean includeResource(String href, String parse, String xpointer, String encoding, String accept, String acceptLanguage) { included = false; try { if (xpointer != null) throw new XMLStreamException("xpointer attribute not yet supported"); if (href == null || "".equals(href)) href = systemId; else href = XMLParser.absolutize(systemId, href); if (parse == null || "xml".equals(parse)) { seen.clear(); result = null; snapshotIndex = 0; walker = null; current = null; backtracking = false; URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); Document doc = getDocumentBuilder().parse(in, href); DocumentTraversal dt = getDocumentTraversal(doc); if (xpointer == null) { result = null; Node item = doc.getDocumentElement(); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); } else { result = null; snapshotIndex = 0; walker = null; // shorthand or scheme-based? int lpi = xpointer.indexOf('('); int rpi = xpointer.indexOf(')', lpi); if (lpi != -1 && rpi != -1) { String scheme = xpointer.substring(0, lpi); if ("element".equals(scheme)) { // element() scheme String elementSchemeData = xpointer.substring(lpi + 1, rpi); Node item = doc; int si = elementSchemeData.indexOf('/'); if (si == -1) { if (elementSchemeData.length() > 0) item = doc.getElementById(elementSchemeData); } else { if (si > 0) { String context = elementSchemeData.substring(0, si); item = doc.getElementById(context); elementSchemeData = elementSchemeData.substring(si + 1); } StringTokenizer st = new StringTokenizer(elementSchemeData, "/"); while (st.hasMoreTokens() && item != null) { int n = Integer.parseInt(st.nextToken()); Node ctx = item.getFirstChild(); int count = 1; while (ctx != null && count++ < n) ctx = ctx.getNextSibling(); item = ctx; } } walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } else if ("xpointer".equals(scheme)) { xpointer = xpointer.substring(lpi + 1, rpi); XPathEvaluator eval = getXPathEvaluator(doc); XPathNSResolver resolver = eval.createNSResolver(doc); result = (XPathResult) eval.evaluate(xpointer, doc, resolver, XPathResult.ANY_TYPE, null); // TODO xpointer() scheme functions included = true; } else { String msg = "Unknown XPointer scheme: " + scheme; throw new XMLStreamException(msg); } } else { Node item = doc.getElementById(xpointer); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } } } else if ("text".equals(parse)) { URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); if (encoding == null) { encoding = connection.getContentEncoding(); if (encoding == null) { String contentType = connection.getContentType(); if (contentType != null) encoding = getParameter(contentType, "charset"); } } if (encoding == null) includedText = new InputStreamReader(in, "UTF-8"); else includedText = new InputStreamReader(in, encoding); included = true; } else throw new XMLStreamException("value of 'parse' attribute must be "+ "'xml' or 'text'"); return true; } catch (IOException e) { return false; } catch (XMLStreamException e) { return false; } catch (SAXException e) { return false; } }
|
boolean includeResource(String href, String parse, String xpointer, String encoding, String accept, String acceptLanguage) { included = false; try { if (xpointer != null) throw new XMLStreamException("xpointer attribute not yet supported"); if (href == null || "".equals(href)) href = systemId; else href = XMLParser.absolutize(base, href); if (parse == null || "xml".equals(parse)) { seen.clear(); result = null; snapshotIndex = 0; walker = null; current = null; backtracking = false; URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); Document doc = getDocumentBuilder().parse(in, href); DocumentTraversal dt = getDocumentTraversal(doc); if (xpointer == null) { result = null; Node item = doc.getDocumentElement(); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); } else { result = null; snapshotIndex = 0; walker = null; // shorthand or scheme-based? int lpi = xpointer.indexOf('('); int rpi = xpointer.indexOf(')', lpi); if (lpi != -1 && rpi != -1) { String scheme = xpointer.substring(0, lpi); if ("element".equals(scheme)) { // element() scheme String elementSchemeData = xpointer.substring(lpi + 1, rpi); Node item = doc; int si = elementSchemeData.indexOf('/'); if (si == -1) { if (elementSchemeData.length() > 0) item = doc.getElementById(elementSchemeData); } else { if (si > 0) { String context = elementSchemeData.substring(0, si); item = doc.getElementById(context); elementSchemeData = elementSchemeData.substring(si + 1); } StringTokenizer st = new StringTokenizer(elementSchemeData, "/"); while (st.hasMoreTokens() && item != null) { int n = Integer.parseInt(st.nextToken()); Node ctx = item.getFirstChild(); int count = 1; while (ctx != null && count++ < n) ctx = ctx.getNextSibling(); item = ctx; } } walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } else if ("xpointer".equals(scheme)) { xpointer = xpointer.substring(lpi + 1, rpi); XPathEvaluator eval = getXPathEvaluator(doc); XPathNSResolver resolver = eval.createNSResolver(doc); result = (XPathResult) eval.evaluate(xpointer, doc, resolver, XPathResult.ANY_TYPE, null); // TODO xpointer() scheme functions included = true; } else { String msg = "Unknown XPointer scheme: " + scheme; throw new XMLStreamException(msg); } } else { Node item = doc.getElementById(xpointer); walker = dt.createTreeWalker(item, SHOW_FLAGS, null, expandERefs); included = true; } } } else if ("text".equals(parse)) { URLConnection connection = getURLConnection(href, accept, acceptLanguage); InputStream in = connection.getInputStream(); if (encoding == null) { encoding = connection.getContentEncoding(); if (encoding == null) { String contentType = connection.getContentType(); if (contentType != null) encoding = getParameter(contentType, "charset"); } } if (encoding == null) includedText = new InputStreamReader(in, "UTF-8"); else includedText = new InputStreamReader(in, encoding); included = true; } else throw new XMLStreamException("value of 'parse' attribute must be "+ "'xml' or 'text'"); return true; } catch (IOException e) { return false; } catch (XMLStreamException e) { return false; } catch (SAXException e) { return false; } }
| 13,976
|
public static float[] read(InputStream input) { FloatSeqHolder h = new FloatSeqHolder(); h._read(input); return h.value; }
|
public static float[] read(InputStream input) { FloatSeqHolder h = new FloatSeqHolder(); h._read(input); return h.value; }
| 13,977
|
public static void write(OutputStream output, float[] value) { FloatSeqHolder h = new FloatSeqHolder(value); h._write(output); }
|
public static void write(OutputStream output, float[] value) { FloatSeqHolder h = new FloatSeqHolder(value); h._write(output); }
| 13,978
|
public DomLSParser(short mode, String schemaType) throws DOMException { switch (mode) { case DOMImplementationLS.MODE_ASYNCHRONOUS: async = true; break; case DOMImplementationLS.MODE_SYNCHRONOUS: async = false; break; default: throw new DomEx(DOMException.NOT_SUPPORTED_ERR); } // TODO schemaType this.schemaType = schemaType; factory = SAXParserFactory.newInstance(); }
|
public DomLSParser(short mode, String schemaType) throws DOMException { switch (mode) { case DOMImplementationLS.MODE_ASYNCHRONOUS: async = true; break; case DOMImplementationLS.MODE_SYNCHRONOUS: async = false; break; default: throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR); } // TODO schemaType this.schemaType = schemaType; factory = SAXParserFactory.newInstance(); }
| 13,979
|
private Document doParse(LSInput input) throws DOMException, LSException { // create event sink if (eventSink != null) { throw new LSException(LSException.PARSE_ERR, "parse in progress"); } InputSource source = getInputSource(input); eventSink = (filter == null) ? new SAXEventSink() : new FilteredSAXEventSink(filter); // configure sink eventSink.namespaceAware = namespaceAware; eventSink.ignoreWhitespace = ignoreWhitespace; eventSink.expandEntityReferences = expandEntityReferences; eventSink.ignoreComments = ignoreComments; eventSink.coalescing = coalescing; // get and configure reader XMLReader reader = getXMLReader(); try { reader.setContentHandler(eventSink); reader.setDTDHandler(eventSink); reader.setProperty("http://xml.org/sax/properties/lexical-handler", eventSink); reader.setProperty("http://xml.org/sax/properties/declaration-handler", eventSink); reader.setFeature("http://xml.org/sax/features/namespaces", namespaceAware); reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); reader.setFeature("http://xml.org/sax/features/validation", validating); try { reader.setFeature("http://xml.org/sax/features/use-attributes2", true); } catch (SAXNotRecognizedException e) { // ignore } try { reader.setFeature("http://xml.org/sax/features/external-general-entities", true); } catch (SAXNotRecognizedException e) { // ignore } reader.setEntityResolver(entityResolver); reader.setErrorHandler(errorHandler); // parse reader.parse(source); } catch (DOMException e) { reader = null; eventSink = null; throw e; } catch (SAXException e) { reader = null; eventSink = null; throw new DomLSEx(LSException.PARSE_ERR, e); } catch (IOException e) { reader = null; eventSink = null; throw new DomLSEx(LSException.PARSE_ERR, e); } // return document Document ret = eventSink.doc; String systemId = input.getSystemId(); if (systemId != null && ret instanceof DomDocument) { ((DomDocument) ret).setDocumentURI(systemId); } eventSink = null; return ret; }
|
private Document doParse(LSInput input) throws DOMException, LSException { // create event sink if (eventSink != null) { throw new LSException(LSException.PARSE_ERR, "parse in progress"); } InputSource source = getInputSource(input); eventSink = (filter == null) ? new SAXEventSink() : new FilteredSAXEventSink(filter); // configure sink eventSink.namespaceAware = namespaceAware; eventSink.ignoreWhitespace = ignoreWhitespace; eventSink.expandEntityReferences = expandEntityReferences; eventSink.ignoreComments = ignoreComments; eventSink.coalescing = coalescing; // get and configure reader XMLReader reader = getXMLReader(); try { reader.setContentHandler(eventSink); reader.setDTDHandler(eventSink); reader.setProperty("http://xml.org/sax/properties/lexical-handler", eventSink); reader.setProperty("http://xml.org/sax/properties/declaration-handler", eventSink); reader.setFeature("http://xml.org/sax/features/namespaces", namespaceAware); reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); reader.setFeature("http://xml.org/sax/features/validation", validating); try { reader.setFeature("http://xml.org/sax/features/use-attributes2", true); } catch (SAXNotRecognizedException e) { // ignore } try { reader.setFeature("http://xml.org/sax/features/external-general-entities", true); } catch (SAXNotRecognizedException e) { // ignore } reader.setEntityResolver(entityResolver); reader.setErrorHandler(errorHandler); // parse reader.parse(source); } catch (DOMException e) { reader = null; eventSink = null; throw e; } catch (SAXException e) { reader = null; eventSink = null; throw new DomLSException(LSException.PARSE_ERR, e); } catch (IOException e) { reader = null; eventSink = null; throw new DomLSException(LSException.PARSE_ERR, e); } // return document Document ret = eventSink.doc; String systemId = input.getSystemId(); if (systemId != null && ret instanceof DomDocument) { ((DomDocument) ret).setDocumentURI(systemId); } eventSink = null; return ret; }
| 13,980
|
private InputSource getInputSource(LSInput input) throws LSException { InputSource source = null; String systemId = input.getSystemId(); InputStream in = input.getByteStream(); if (in != null) { source = new InputSource(in); source.setSystemId(systemId); } if (source == null && entityResolver != null) { String publicId = input.getPublicId(); try { source = entityResolver.resolveEntity(publicId, systemId); } catch (SAXException e) { throw new DomLSEx(LSException.PARSE_ERR, e); } catch (IOException e) { throw new DomLSEx(LSException.PARSE_ERR, e); } } if (source == null) { URL url = null; String base = input.getBaseURI(); try { try { URL baseURL = (base == null) ? null : new URL(base); url = (baseURL == null) ? new URL(systemId) : new URL(baseURL, systemId); } catch (MalformedURLException e) { File baseFile = (base == null) ? null : new File(base); url = (baseFile == null) ? new File(systemId).toURL() : new File(baseFile, systemId).toURL(); } in = url.openStream(); systemId = url.toString(); source = new InputSource(in); source.setSystemId(systemId); } catch (IOException e) { throw new DomLSEx(LSException.PARSE_ERR, e); } } return source; }
|
private InputSource getInputSource(LSInput input) throws LSException { InputSource source = null; String systemId = input.getSystemId(); InputStream in = input.getByteStream(); if (in != null) { source = new InputSource(in); source.setSystemId(systemId); } if (source == null && entityResolver != null) { String publicId = input.getPublicId(); try { source = entityResolver.resolveEntity(publicId, systemId); } catch (SAXException e) { throw new DomLSException(LSException.PARSE_ERR, e); } catch (IOException e) { throw new DomLSException(LSException.PARSE_ERR, e); } } if (source == null) { URL url = null; String base = input.getBaseURI(); try { try { URL baseURL = (base == null) ? null : new URL(base); url = (baseURL == null) ? new URL(systemId) : new URL(baseURL, systemId); } catch (MalformedURLException e) { File baseFile = (base == null) ? null : new File(base); url = (baseFile == null) ? new File(systemId).toURL() : new File(baseFile, systemId).toURL(); } in = url.openStream(); systemId = url.toString(); source = new InputSource(in); source.setSystemId(systemId); } catch (IOException e) { throw new DomLSException(LSException.PARSE_ERR, e); } } return source; }
| 13,981
|
public Object getParameter(String name) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { return coalescing ? Boolean.FALSE : Boolean.TRUE; } else if ("comments".equals(name)) { return ignoreComments ? Boolean.FALSE : Boolean.TRUE; } else if ("element-content-whitespace".equals(name)) { return ignoreWhitespace ? Boolean.FALSE : Boolean.TRUE; } else if ("namespaces".equals(name)) { return namespaceAware ? Boolean.TRUE : Boolean.FALSE; } else if ("expand-entity-references".equals(name)) { return expandEntityReferences ? Boolean.TRUE : Boolean.FALSE; } else if ("coalescing".equals(name)) { return coalescing ? Boolean.TRUE : Boolean.FALSE; } else if ("validating".equals(name)) { return validating ? Boolean.TRUE : Boolean.FALSE; } else if ("xinclude-aware".equals(name)) { return xIncludeAware ? Boolean.TRUE : Boolean.FALSE; } else if ("entity-resolver".equals(name)) { return entityResolver; } else if ("error-handler".equals(name)) { return errorHandler; } else { throw new DomEx(DomEx.NOT_SUPPORTED_ERR); } }
|
public Object getParameter(String name) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { return coalescing ? Boolean.FALSE : Boolean.TRUE; } else if ("comments".equals(name)) { return ignoreComments ? Boolean.FALSE : Boolean.TRUE; } else if ("element-content-whitespace".equals(name)) { return ignoreWhitespace ? Boolean.FALSE : Boolean.TRUE; } else if ("namespaces".equals(name)) { return namespaceAware ? Boolean.TRUE : Boolean.FALSE; } else if ("expand-entity-references".equals(name)) { return expandEntityReferences ? Boolean.TRUE : Boolean.FALSE; } else if ("coalescing".equals(name)) { return coalescing ? Boolean.TRUE : Boolean.FALSE; } else if ("validating".equals(name)) { return validating ? Boolean.TRUE : Boolean.FALSE; } else if ("xinclude-aware".equals(name)) { return xIncludeAware ? Boolean.TRUE : Boolean.FALSE; } else if ("entity-resolver".equals(name)) { return entityResolver; } else if ("error-handler".equals(name)) { return errorHandler; } else { throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR); } }
| 13,982
|
private XMLReader getXMLReader() throws LSException { if (reader == null) { factory.setNamespaceAware(namespaceAware); factory.setValidating(validating); factory.setXIncludeAware(xIncludeAware); try { SAXParser parser = factory.newSAXParser(); reader = parser.getXMLReader(); } catch (ParserConfigurationException e) { throw new DomLSEx(LSException.PARSE_ERR, e); } catch (SAXException e) { throw new DomLSEx(LSException.PARSE_ERR, e); } } return reader; }
|
private XMLReader getXMLReader() throws LSException { if (reader == null) { factory.setNamespaceAware(namespaceAware); factory.setValidating(validating); factory.setXIncludeAware(xIncludeAware); try { SAXParser parser = factory.newSAXParser(); reader = parser.getXMLReader(); } catch (ParserConfigurationException e) { throw new DomLSException(LSException.PARSE_ERR, e); } catch (SAXException e) { throw new DomLSException(LSException.PARSE_ERR, e); } } return reader; }
| 13,983
|
public void setParameter(String name, Object value) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { coalescing = !((Boolean) value).booleanValue(); } else if ("comments".equals(name)) { ignoreComments = !((Boolean) value).booleanValue(); } else if ("element-content-whitespace".equals(name)) { ignoreWhitespace = !((Boolean) value).booleanValue(); } else if ("namespaces".equals(name)) { namespaceAware = ((Boolean) value).booleanValue(); } else if ("expand-entity-references".equals(name)) { expandEntityReferences = ((Boolean) value).booleanValue(); } else if ("coalescing".equals(name)) { coalescing = ((Boolean) value).booleanValue(); } else if ("validating".equals(name)) { validating = ((Boolean) value).booleanValue(); } else if ("xinclude-aware".equals(name)) { xIncludeAware = ((Boolean) value).booleanValue(); } else if ("entity-resolver".equals(name)) { entityResolver = (EntityResolver) value; } else if ("error-handler".equals(name)) { errorHandler = (ErrorHandler) value; } else { throw new DomEx(DomEx.NOT_SUPPORTED_ERR); } // invalidate reader, a new one will be created reader = null; }
|
public void setParameter(String name, Object value) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { coalescing = !((Boolean) value).booleanValue(); } else if ("comments".equals(name)) { ignoreComments = !((Boolean) value).booleanValue(); } else if ("element-content-whitespace".equals(name)) { ignoreWhitespace = !((Boolean) value).booleanValue(); } else if ("namespaces".equals(name)) { namespaceAware = ((Boolean) value).booleanValue(); } else if ("expand-entity-references".equals(name)) { expandEntityReferences = ((Boolean) value).booleanValue(); } else if ("coalescing".equals(name)) { coalescing = ((Boolean) value).booleanValue(); } else if ("validating".equals(name)) { validating = ((Boolean) value).booleanValue(); } else if ("xinclude-aware".equals(name)) { xIncludeAware = ((Boolean) value).booleanValue(); } else if ("entity-resolver".equals(name)) { entityResolver = (EntityResolver) value; } else if ("error-handler".equals(name)) { errorHandler = (ErrorHandler) value; } else { throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR); } // invalidate reader, a new one will be created reader = null; }
| 13,984
|
public int statusAll(boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (load && e.status == 0) { boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; } result |= e.status; e = e.next; } return result; }
|
public int statusAll(boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (load && e.status == 0) { boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; } result |= e.status; e = e.next; } return result; }
| 13,985
|
public int statusID(int id, boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (e.id == id) { if (load && e.status == 0) { boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; } result |= e.status; } e = e.next; } return result; }
|
public int statusID(int id, boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (e.id == id) { if (load && e.status == 0) { boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; } result |= e.status; } e = e.next; } return result; }
| 13,987
|
public VmType getType() { return type; }
|
public VmType<?> getType() { return type; }
| 13,989
|
public void setNodeValue(String value) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (value == null) { value = ""; } String oldValue = getNodeValue(); while (last != null) { removeChild(last); } // don't create a new node just for this... /* Node text = owner.createTextNode(value); appendChild(text); */ this.value = value; length = 1; specified = true; mutating(oldValue, value, MutationEvent.MODIFICATION); }
|
public void setNodeValue(String value) { if (readonly) { throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); } if (value == null) { value = ""; } String oldValue = getNodeValue(); while (last != null) { removeChild(last); } // don't create a new node just for this... /* Node text = owner.createTextNode(value); appendChild(text); */ this.value = value; length = 1; specified = true; mutating(oldValue, value, MutationEvent.MODIFICATION); }
| 13,990
|
public final void setOwnerElement(Element e) { if (parent != null) { throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomEx(DomEx.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth = parent.depth + 1; }
|
public final void setOwnerElement(Element e) { if (parent != null) { throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomEx(DomEx.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth = parent.depth + 1; }
| 13,991
|
public final void setOwnerElement(Element e) { if (parent != null) { throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomEx(DomEx.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth = parent.depth + 1; }
|
public final void setOwnerElement(Element e) { if (parent != null) { throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth = parent.depth + 1; }
| 13,992
|
public Box(int a) { setLayout(new BoxLayout(this, a)); }
|
public Box(int axis) { setLayout(new BoxLayout(this, a)); }
| 13,993
|
public Box(int a) { setLayout(new BoxLayout(this, a)); }
|
public Box(int a) { setLayout(new BoxLayout(this, axis)); }
| 13,994
|
public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? null : arg.evaluate(context, pos, len); return _namespace_uri(context, (Collection) val); }
|
public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? Collections.singleton(context) : arg.evaluate(context, pos, len); return _namespace_uri(context, (Collection) val); }
| 13,995
|
public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JToggleButton"; }
|
public String getUIClassID() { //Returns a string that specifies the name of the L&F class that renders this component. return "JToggleButton"; }
| 13,996
|
public AccessibleContext getAccessibleContext() { // Gets the AccessibleContext associated with this JButton. return null; }
|
public AccessibleContext getAccessibleContext() { // Gets the AccessibleContext associated with this JButton. if (accessibleContext == null) accessibleContext = new AccessibleJButton(); return accessibleContext; }
| 13,997
|
protected String paramString() { return "JButton"; }
|
protected String paramString() { String superParam = super.paramString(); StringBuffer sb = new StringBuffer(41); sb.append(",defaultButton=").append(is_def); sb.append(",defaultCapable=").append(def); return superParam + sb.toString(); }
| 13,998
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement and key pair generator"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
| 13,999
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
| 14,000
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
| 14,001
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
| 14,002
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
|
public Gnu() { super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement"); AccessController.doPrivileged (new PrivilegedAction() { public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; } }); }
| 14,003
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
| 14,004
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
| 14,005
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
| 14,006
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
|
public Object run() { // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Signature.SHA1withDSA", gnu.java.security.provider.DSASignature.class.getName()); put("Alg.Alias.Signature.DSS", "SHA1withDSA"); put("Alg.Alias.Signature.DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA"); put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA"); put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA"); put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA"); put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA"); put("Signature.MD2withRSA", MD2withRSA.class.getName()); put("Signature.MD2withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); put("Signature.MD4withRSA", MD4withRSA.class.getName()); put("Signature.MD4withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA"); put("Signature.MD5withRSA", MD5withRSA.class.getName()); put("Signature.MD5withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); put("Signature.SHA1withRSA", SHA1withRSA.class.getName()); put("Signature.SHA1withRSA ImplementedIn", "Software"); put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA"); put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); // Key Pair Generator put("KeyPairGenerator.DSA", gnu.java.security.provider.DSAKeyPairGenerator.class.getName()); put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); // Key Factory put("KeyFactory.DSA", gnu.java.security.provider.DSAKeyFactory.class.getName()); put("KeyFactory.Encoded", EncodedKeyFactory.class.getName()); put("KeyFactory.Encoded ImplementedIn", "Software"); put("Alg.Alias.KeyFactory.X.509", "Encoded"); put("Alg.Alias.KeyFactory.X509", "Encoded"); put("Alg.Alias.KeyFactory.PKCS#8", "Encoded"); put("Alg.Alias.KeyFactory.PKCS8", "Encoded"); put("KeyFactory.RSA", RSAKeyFactory.class.getName()); put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA"); put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA"); // Message Digests put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName()); // Format "Alias", "Actual Name" put("Alg.Alias.MessageDigest.SHA1", "SHA"); put("Alg.Alias.MessageDigest.SHA-1", "SHA"); put("Alg.Alias.MessageDigest.SHA-160", "SHA"); // Algorithm Parameters put("AlgorithmParameters.DSA", gnu.java.security.provider.DSAParameters.class.getName()); put("Alg.Alias.AlgorithmParameters.DSS", "DSA"); put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA"); put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA"); put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA"); // Algorithm Parameter Generator put("AlgorithmParameterGenerator.DSA", gnu.java.security.provider.DSAParameterGenerator.class.getName()); // SecureRandom put("SecureRandom.SHA1PRNG", gnu.java.security.provider.SHA1PRNG.class.getName()); // CertificateFactory put("CertificateFactory.X509", X509CertificateFactory.class.getName()); put("CertificateFactory.X509 ImplementedIn", "Software"); put("Alg.Alias.CertificateFactory.X.509", "X509"); // CertPathValidator put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName()); put("CertPathValidator.PKIX ImplementedIn", "Software"); // CertStore put("CertStore.Collection", CollectionCertStoreImpl.class.getName()); // KeyAgreement put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName()); put("Alg.Alias.KeyAgreement.DH", "DiffieHellman"); // Cipher put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName()); put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5"); return null; }
| 14,007
|
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); chooser.setFont(defaults.getFont("ColorChooser.font")); chooser.setForeground(defaults.getColor("ColorChooser.foreground")); chooser.setBackground(defaults.getColor("ColorChooser.background")); }
|
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); chooser.setFont(defaults.getFont("ColorChooser.font")); chooser.setForeground(defaults.getColor("ColorChooser.foreground")); chooser.setBackground(defaults.getColor("ColorChooser.background")); }
| 14,008
|
public void addTab(String name, Icon icon, Component panel) { addTab(name, icon, panel, null); }
|
public void addTab(String name, Icon icon, Component panel) { addTab(name, icon, panel, null); }
| 14,009
|
private synchronized void deliver(UDPHeader hdr, SocketBuffer skbuf) throws SocketException { final Integer lport = new Integer(hdr.getDstPort()); final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader(); final UDPDatagramSocketImpl socket = (UDPDatagramSocketImpl) sockets .get(lport); if (socket != null) { final InetAddress laddr = socket.getLocalAddress(); if (laddr.isAnyLocalAddress() || laddr.equals(ipHdr.getDestination().toInetAddress())) { if (socket.deliverReceived(skbuf)) { return; } } } stat.noport.inc(); if (ipHdr.getDestination().isBroadcast()) { stat.noportbcast.inc(); } // Send a port unreachable back icmp.sendPortUnreachable(skbuf); }
|
private synchronized void deliver(UDPHeader hdr, SocketBuffer skbuf) throws SocketException { final Integer lport = new Integer(hdr.getDstPort()); final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader(); final UDPDatagramSocketImpl socket = (UDPDatagramSocketImpl) sockets .get(lport); if (socket != null) { final InetAddress laddr = socket.getLocalAddress(); if (laddr.isAnyLocalAddress() || laddr.equals(ipHdr.getDestination().toInetAddress())) { if (socket.deliverReceived(skbuf)) { return; } } } stat.noport.inc(); if (ipHdr.getDestination().isBroadcast()) { stat.noportbcast.inc(); } // Send a port unreachable back icmp.sendPortUnreachable(skbuf); }
| 14,010
|
private synchronized void deliver(UDPHeader hdr, SocketBuffer skbuf) throws SocketException { final Integer lport = new Integer(hdr.getDstPort()); final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader(); final UDPDatagramSocketImpl socket = (UDPDatagramSocketImpl) sockets .get(lport); if (socket != null) { final InetAddress laddr = socket.getLocalAddress(); if (laddr.isAnyLocalAddress() || laddr.equals(ipHdr.getDestination().toInetAddress())) { if (socket.deliverReceived(skbuf)) { return; } } } stat.noport.inc(); if (ipHdr.getDestination().isBroadcast()) { stat.noportbcast.inc(); } // Send a port unreachable back icmp.sendPortUnreachable(skbuf); }
|
private synchronized void deliver(UDPHeader hdr, SocketBuffer skbuf) throws SocketException { final Integer lport = new Integer(hdr.getDstPort()); final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader(); final UDPDatagramSocketImpl socket = (UDPDatagramSocketImpl) sockets .get(lport); if (socket != null) { final InetAddress laddr = socket.getLocalAddress(); if (laddr.isAnyLocalAddress() || laddr.equals(ipHdr.getDestination().toInetAddress())) { if (socket.deliverReceived(skbuf)) { return; } } } stat.noport.inc(); if (ipHdr.getDestination().isBroadcast()) { stat.noportbcast.inc(); } // Send a port unreachable back icmp.sendPortUnreachable(skbuf); }
| 14,011
|
public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); }
|
public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException e) { } throw new NoSuchAlgorithmException(algorithm); }
| 14,013
|
public void append(StringBuilder sb) { sb.append(name); sb.append(" #"); sb.append(instanceCount); if (objectSize != 0) { sb.append(usage); sb.append(getTotalSize()); } }
|
public void append(StringBuilder sb) { sb.append(name); sb.append(" #"); sb.append(instanceCount); if (objectSize != 0) { sb.append(usage); long size = getTotalSize(); if (size >= 1024) { sb.append(NumberUtils.size(size) + " (" + getTotalSize() + "b)"); } else { sb.append(size + "b"); } } }
| 14,014
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,016
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,017
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,018
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,019
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,020
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,021
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,022
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,023
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,024
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,025
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,026
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,027
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emmitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
|
public boolean emit(String mnemonic, List<Object> operands, int operandSize) { this.operands = operands; this.operandSize = operandSize; Integer key = (Integer) INSTRUCTION_MAP.get(mnemonic); if (key == null) return false; switch (key.intValue()) { case EMMS_ISN: emmitEMMS(); break; case MOVD_ISN: emmitMOVD(); break; case MOVQ_ISN: emmitMOVQ(); break; case PACKUSWB_ISN: emmitPACKUSWB(); break; case PADDW_ISN: emmitPADDW(); break; case PAND_ISN: emmitPAND(); break; case PCMPGTW_ISN: emmitPCMPGTW(); break; case PMULLW_ISN: emmitPMULLW(); break; case PSHUFW_ISN: emmitPSHUFW(); break; case PSRLW_ISN: emmitPSRLW(); break; case PSUBW_ISN: emmitPSUBW(); break; case PUNPCKLBW_ISN: emmitPUNPCKLBW(); break; case PXOR_ISN: emitPXOR(); break; default: throw new Error("Invalid instruction binding " + key.intValue() + " for " + mnemonic); } return true; }
| 14,028
|
public void validateInvalidComponents() { // In order to keep the blocking of application threads minimal, we switch // the invalidComponents field with the workInvalidComponents field and // work with the workInvalidComponents field. synchronized(this) { ArrayList swap = invalidComponents; invalidComponents = workInvalidComponents; workInvalidComponents = swap; } for (Iterator i = workInvalidComponents.iterator(); i.hasNext(); ) { JComponent comp = (JComponent) i.next(); if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); } workInvalidComponents.clear(); }
|
public void validateInvalidComponents() { // In order to keep the blocking of application threads minimal, we switch // the invalidComponents field with the workInvalidComponents field and // work with the workInvalidComponents field. synchronized(this) { ArrayList swap = invalidComponents; invalidComponents = workInvalidComponents; workInvalidComponents = swap; } for (Iterator i = workInvalidComponents.iterator(); i.hasNext(); ) { Component comp = (Component) i.next(); while ((!(comp instanceof JComponent) || !((JComponent) comp).isValidateRoot()) && comp.getParent() != null) comp = comp.getParent(); if (! (comp.isVisible() && comp.isShowing())) continue; comp.validate(); } workInvalidComponents.clear(); }
| 14,029
|
public void installUI(final JComponent c) { super.installUI(c); this.installDefaults((JScrollPane)c); }
|
public void installUI(final JComponent c) { super.installUI(c); this.installDefaults((JScrollPane)c); }
| 14,030
|
public void uninstallUI(final JComponent c) { super.uninstallUI(c); this.uninstallDefaults((JScrollPane)c); }
|
public void uninstallUI(final JComponent c) { super.uninstallUI(c); this.uninstallDefaults((JScrollPane)c); uninstallListeners((JScrollPane) c); }
| 14,031
|
public void waitForIdle () { if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread"); EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue (); while (q.peekEvent () != null) { try { wait (); } catch (InterruptedException e) { System.err.println ("Robot: waitForIdle interrupted"); } } }
|
public void waitForIdle () { if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread"); EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue (); while (q.peekEvent () != null) { try { wait (); } catch (InterruptedException e) { System.err.println ("Robot: waitForIdle interrupted"); } } }
| 14,032
|
public void waitForIdle () { if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread"); EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue (); while (q.peekEvent () != null) { try { wait (); } catch (InterruptedException e) { System.err.println ("Robot: waitForIdle interrupted"); } } }
|
public void waitForIdle () { if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread"); EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue (); while (q.peekEvent () != null) { try { q.invokeAndWait (new Runnable () { public void run () { } }); } catch (InterruptedException e) { System.err.println ("Robot: waitForIdle interrupted"); } } }
| 14,033
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
| 14,035
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset.LT(size)) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
| 14,036
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
| 14,037
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset.LT(size))) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
| 14,038
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
|
protected final void defragment() throws UninterruptiblePragma { final int size = getSize(); int offset = headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; lock(); try { Address firstFreePtr = null; while (offset < size) { final Address ptr = start.add(offset); final int objSize = ptr.loadInt(sizeOffset); final int nextOffset = offset + objSize + headerSize; final Object vmt = ptr.loadObjectReference(tibOffset); if ((firstFreePtr == null) && (vmt == FREE)) { firstFreePtr = ptr; } if ((vmt == FREE) && (nextOffset < size)) { final Object nextVmt; final Address nextObjectPtr = start.add(nextOffset); nextVmt = nextObjectPtr.loadObjectReference(tibOffset); if (nextVmt == FREE) { // Combine two free spaces int nextObjSize = nextObjectPtr.loadInt(sizeOffset); int newObjSize = objSize + headerSize + nextObjSize; ptr.store(newObjSize, sizeOffset); // Do not increment offset here, because there may be // another next free object, which we will combine // in the next loop. } else { offset = nextOffset; } } else { offset = nextOffset; } } // Set the address of the next free block, to the first free block this.nextFreePtr = firstFreePtr; } finally { unlock(); } }
| 14,039
|
protected void initialize(Address start, Address end, int slotSize) { // Set my variables this.start = start; this.end = end; initializeAbstract(slotSize); this.sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); this.headerSize = ObjectLayout.objectAlign(this.headerSize + slotSize); final int size = getSize(); final Address myAddr = ObjectReference.fromObject(this).toAddress(); final int mySize = myAddr.loadInt(sizeOffset); Address firstObject; if (inHeap(myAddr)) { firstObject = myAddr.add(mySize).add(headerSize); } else { firstObject = start.add(headerSize); } // Initialize an allocation bitmap final int allocationBits = size / ObjectLayout.OBJECT_ALIGN; final int allocationBitmapSize = ObjectLayout .objectAlign((allocationBits + 7) / 8); this.allocationBitmapPtr = firstObject; final Address bitmapPtr = this.allocationBitmapPtr; // Make the bitmap an object, so it is easy to manipulate. bitmapPtr.store(Word.fromIntZeroExtend(allocationBitmapSize), sizeOffset); bitmapPtr.store(Word.fromIntZeroExtend(GC_DEFAULT_COLOR), flagsOffset); bitmapPtr.store(ObjectReference.fromObject(VmType.getObjectClass().getTIB()), tibOffset); firstObject = firstObject.add(allocationBitmapSize + headerSize); helper.clear(allocationBitmapPtr, allocationBitmapSize); this.allocationBitmap = allocationBitmapPtr.toObjectReference().toObject(); // Mark this heap in the allocation bitmap setAllocationBit(this, true); // Mark the allocation bitmap in the allocation bitmap setAllocationBit(allocationBitmap, true); // Initialize the remaining space as free object. final Word remainingSize = end.toWord().sub(firstObject.toWord()); final Address ptr = firstObject; ptr.store(remainingSize, sizeOffset); ptr.store(ObjectReference.fromObject(FREE), tibOffset); this.nextFreePtr = ptr; this.freeSize = remainingSize.toExtent(); }
|
protected void initialize(Address start, Address end, int slotSize) { // Set my variables this.start = start; this.end = end; initializeAbstract(slotSize); this.sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); this.headerSize = ObjectLayout.objectAlign(this.headerSize + slotSize); final int size = getSize(); final Address myAddr = ObjectReference.fromObject(this).toAddress(); final Word mySize = myAddr.loadWord(sizeOffset); Address firstObject; if (inHeap(myAddr)) { firstObject = myAddr.add(mySize).add(headerSize); } else { firstObject = start.add(headerSize); } // Initialize an allocation bitmap final int allocationBits = size / ObjectLayout.OBJECT_ALIGN; final int allocationBitmapSize = ObjectLayout .objectAlign((allocationBits + 7) / 8); this.allocationBitmapPtr = firstObject; final Address bitmapPtr = this.allocationBitmapPtr; // Make the bitmap an object, so it is easy to manipulate. bitmapPtr.store(Word.fromIntZeroExtend(allocationBitmapSize), sizeOffset); bitmapPtr.store(Word.fromIntZeroExtend(GC_DEFAULT_COLOR), flagsOffset); bitmapPtr.store(ObjectReference.fromObject(VmType.getObjectClass().getTIB()), tibOffset); firstObject = firstObject.add(allocationBitmapSize + headerSize); helper.clear(allocationBitmapPtr, allocationBitmapSize); this.allocationBitmap = allocationBitmapPtr.toObjectReference().toObject(); // Mark this heap in the allocation bitmap setAllocationBit(this, true); // Mark the allocation bitmap in the allocation bitmap setAllocationBit(allocationBitmap, true); // Initialize the remaining space as free object. final Word remainingSize = end.toWord().sub(firstObject.toWord()); final Address ptr = firstObject; ptr.store(remainingSize, sizeOffset); ptr.store(ObjectReference.fromObject(FREE), tibOffset); this.nextFreePtr = ptr; this.freeSize = remainingSize.toExtent(); }
| 14,040
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(ObjectFlags.GC_DEFAULT_COLOR, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(ObjectFlags.GC_DEFAULT_COLOR, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
| 14,041
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(ObjectFlags.GC_DEFAULT_COLOR, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(flags, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
| 14,042
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(ObjectFlags.GC_DEFAULT_COLOR, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
|
protected static VmAbstractHeap setupHeap(HeapHelper helper, Address start, VmNormalClass heapClass, int slotSize) { final int headerSize = ObjectLayout .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize); final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize); final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize)); final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize); // Setup a heap object, so the heap can initialize itself. final Address heapPtr = start.add(headerSize); final int heapObjSize = ObjectLayout.objectAlign(heapClass .getObjectSize()); heapPtr.store(heapObjSize, sizeOffset); heapPtr.store(ObjectFlags.GC_DEFAULT_COLOR, flagsOffset); heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset); helper.clear(heapPtr, heapObjSize.toInt()); VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject(); heap.helper = helper; return heap; }
| 14,043
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final Word headerSize = Word.fromIntZeroExtend(this.headerSize); final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,044
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,045
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset.LT(size)) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset.LT(size)) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,046
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final Word objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,047
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadWord(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadWord(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,048
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop return; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop return; } } } offset += objSize + headerSize; } } }
| 14,049
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset = offset.add(objSize).add(headerSize); } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset = offset.add(objSize).add(headerSize); } } }
| 14,050
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final int objSize = ptr.loadInt(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
|
protected final void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) { // Go through the heap and call visit on each object final int headerSize = this.headerSize; final Offset sizeOffset = this.sizeOffset; final Offset tibOffset = this.tibOffset; final Object FREE = this.FREE; int offset = headerSize; final int size = getSize(); if (locking) { while (offset < size) { final Object tib; final Object object; final int objSize; final Word flags; lock(); try { final Address ptr = start.add(offset); object = ptr.toObjectReference().toObject(); tib = ptr.loadObjectReference(tibOffset); objSize = ptr.loadInt(sizeOffset); flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); } finally { unlock(); } if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } else { while (offset < size) { final Address ptr = start.add(offset); final Object object = ptr.toObjectReference().toObject(); final Object tib = ptr.loadObjectReference(tibOffset); final Word objSize = ptr.loadWord(sizeOffset); final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask); if (tib != FREE) { if (flags.EQ(flagsValue)) { if (!visitor.visit(object)) { // Stop offset = size; } } } offset += objSize + headerSize; } } }
| 14,051
|
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "fb0"; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); log.info("Using device " + dev.getId()); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { log.error("Error in FBTest", ex); } finally { if (g != null) { log.info("Close graphics"); g.close(); } log.info("End of FBTest"); } }
|
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "" ; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); log.info("Using device " + dev.getId()); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { log.error("Error in FBTest", ex); } finally { if (g != null) { log.info("Close graphics"); g.close(); } log.info("End of FBTest"); } }
| 14,052
|
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "fb0"; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); log.info("Using device " + dev.getId()); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { log.error("Error in FBTest", ex); } finally { if (g != null) { log.info("Close graphics"); g.close(); } log.info("End of FBTest"); } }
|
public static void main(String[] args) throws Exception { final String devId = (args.length > 0) ? args[0] : "fb0"; final int count = (args.length > 1) ? Integer.parseInt(args[1]) : 100; final String tests = (args.length > 2) ? args[2] : "plrREQ"; Surface g = null; try { final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME); final Device dev = dm.getDevice(devId); log.info("Using device " + dev.getId()); final FrameBufferAPI api = (FrameBufferAPI) dev.getAPI(FrameBufferAPI.class); final FrameBufferConfiguration conf = api.getConfigurations()[0]; g = api.open(conf); new FBTest(g, conf.getScreenWidth(), conf.getScreenHeight(), count, tests).perform(); Thread.sleep(3000); } catch (Throwable ex) { log.error("Error in FBTest", ex); } finally { if (g != null) { log.info("Close graphics"); g.close(); } log.info("End of FBTest"); } }
| 14,053
|
void addHyperlinkListener(HyperlinkListener listener) { }
|
void addHyperlinkListener(HyperlinkListener listener) { }
| 14,054
|
void removeHyperlinkListener(HyperlinkListener listener) { //Removes a hyperlink listener. }
|
void removeHyperlinkListener(HyperlinkListener listener) { //Removes a hyperlink listener. }
| 14,055
|
private static BreakIterator getInstance (String type, Locale loc) { String className; try { ResourceBundle res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", loc); className = res.getString(type); } catch (MissingResourceException x) { return null; } try { Class k = Class.forName(className); return (BreakIterator) k.newInstance(); } catch (ClassNotFoundException x1) { return null; } catch (InstantiationException x2) { return null; } catch (IllegalAccessException x3) { return null; } }
|
private static BreakIterator getInstance (String type, Locale loc) { String className; try { ResourceBundle res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", loc, ClassLoader.getSystemClassLoader()); className = res.getString(type); } catch (MissingResourceException x) { return null; } try { Class k = Class.forName(className); return (BreakIterator) k.newInstance(); } catch (ClassNotFoundException x1) { return null; } catch (InstantiationException x2) { return null; } catch (IllegalAccessException x3) { return null; } }
| 14,057
|
public boolean equals (Object obj) { if (! (obj instanceof FieldPosition)) return false; FieldPosition fp = (FieldPosition) obj; return (field_id == fp.field_id && begin == fp.begin && end == fp.end); }
|
public boolean equals (Object obj) { if (this == obj) return true; if (obj == null || obj.getClass() != this.getClass()) return false; FieldPosition fp = (FieldPosition) obj; return (field_id == fp.field_id && begin == fp.begin && end == fp.end); }
| 14,059
|
public String toString () { return (getClass ().getName () + "[field=" + getField () + ",beginIndex=" + getBeginIndex () + ",endIndex=" + getEndIndex () + "]"); }
|
public String toString () { return (getClass ().getName () + "[field=" + getField () + ",beginIndex=" + getBeginIndex () + ",endIndex=" + getEndIndex () + "]"); }
| 14,061
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
| 14,062
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
|
equals(Object obj){ if (obj == this) return true; else return(false);}
| 14,063
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
|
equals(Object obj){ if (obj == this) return(true); else return(false);}
| 14,064
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.