com.sun.istack.internal.FinalArrayList Java Examples
The following examples show how to use
com.sun.istack.internal.FinalArrayList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OutboundStreamHeader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #2
Source File: OutboundStreamHeader.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #3
Source File: OutboundReferenceParameterHeader.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #4
Source File: OutboundStreamHeader.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #5
Source File: OutboundReferenceParameterHeader.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #6
Source File: OutboundReferenceParameterHeader.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #7
Source File: OutboundStreamHeader.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #8
Source File: OutboundReferenceParameterHeader.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #9
Source File: OutboundStreamHeader.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #10
Source File: OutboundStreamHeader.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #11
Source File: OutboundReferenceParameterHeader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #12
Source File: OutboundStreamHeader.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #13
Source File: OutboundReferenceParameterHeader.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #14
Source File: OutboundReferenceParameterHeader.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #15
Source File: OutboundStreamHeader.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); attributes = new FinalArrayList<Attribute>(); for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); attributes.add(new Attribute(namespaceURI,localName,value)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #16
Source File: OutboundReferenceParameterHeader.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * We don't really expect this to be used, but just to satisfy * the {@link Header} contract. * * So this is rather slow. */ private void parseAttributes() { try { XMLStreamReader reader = readHeader(); reader.nextTag(); // move to the first element, which is the header element attributes = new FinalArrayList<Attribute>(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; } attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } }
Example #17
Source File: ContextFactory.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Look for jaxb.index file in the specified package and load it's contents * * @param pkg package name to search in * @param classLoader ClassLoader to search in * @return a List of Class objects to load, null if there weren't any * @throws IOException if there is an error reading the index file * @throws JAXBException if there are any errors in the index file */ private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException { final String resource = pkg.replace('.', '/') + "/jaxb.index"; final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); if (resourceAsStream == null) { return null; } BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); try { FinalArrayList<Class> classes = new FinalArrayList<Class>(); String className = in.readLine(); while (className != null) { className = className.trim(); if (className.startsWith("#") || (className.length() == 0)) { className = in.readLine(); continue; } if (className.endsWith(".class")) { throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className)); } try { classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e); } className = in.readLine(); } return classes; } finally { in.close(); } }
Example #18
Source File: StreamHeader11.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_ACTOR_NEXT; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_1_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_1_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #19
Source File: StreamHeader11.java From hottub with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_ACTOR_NEXT; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_1_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_1_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #20
Source File: StreamHeader12.java From hottub with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_2_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } else if (SOAP_1_2_RELAY.equals(localName)) { _isRelay = Util.parseBool(value); } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #21
Source File: StreamHeader12.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_2_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } else if (SOAP_1_2_RELAY.equals(localName)) { _isRelay = Util.parseBool(value); } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #22
Source File: ContextFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Look for jaxb.index file in the specified package and load it's contents * * @param pkg package name to search in * @param classLoader ClassLoader to search in * @return a List of Class objects to load, null if there weren't any * @throws IOException if there is an error reading the index file * @throws JAXBException if there are any errors in the index file */ private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException { final String resource = pkg.replace('.', '/') + "/jaxb.index"; final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); if (resourceAsStream == null) { return null; } BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); try { FinalArrayList<Class> classes = new FinalArrayList<Class>(); String className = in.readLine(); while (className != null) { className = className.trim(); if (className.startsWith("#") || (className.length() == 0)) { className = in.readLine(); continue; } if (className.endsWith(".class")) { throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className)); } try { classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e); } className = in.readLine(); } return classes; } finally { in.close(); } }
Example #23
Source File: StreamHeader11.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_ACTOR_NEXT; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_1_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_1_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #24
Source File: StreamHeader12.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_2_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } else if (SOAP_1_2_RELAY.equals(localName)) { _isRelay = Util.parseBool(value); } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #25
Source File: ContextFactory.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Look for jaxb.index file in the specified package and load it's contents * * @param pkg package name to search in * @param classLoader ClassLoader to search in * @return a List of Class objects to load, null if there weren't any * @throws IOException if there is an error reading the index file * @throws JAXBException if there are any errors in the index file */ private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException { final String resource = pkg.replace('.', '/') + "/jaxb.index"; final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); if (resourceAsStream == null) { return null; } BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); try { FinalArrayList<Class> classes = new FinalArrayList<Class>(); String className = in.readLine(); while (className != null) { className = className.trim(); if (className.startsWith("#") || (className.length() == 0)) { className = in.readLine(); continue; } if (className.endsWith(".class")) { throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className)); } try { classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e); } className = in.readLine(); } return classes; } finally { in.close(); } }
Example #26
Source File: StreamHeader12.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_2_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } else if (SOAP_1_2_RELAY.equals(localName)) { _isRelay = Util.parseBool(value); } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #27
Source File: ContextFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Look for jaxb.index file in the specified package and load it's contents * * @param pkg package name to search in * @param classLoader ClassLoader to search in * @return a List of Class objects to load, null if there weren't any * @throws IOException if there is an error reading the index file * @throws JAXBException if there are any errors in the index file */ private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException { final String resource = pkg.replace('.', '/') + "/jaxb.index"; final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); if (resourceAsStream == null) { return null; } BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); try { FinalArrayList<Class> classes = new FinalArrayList<Class>(); String className = in.readLine(); while (className != null) { className = className.trim(); if (className.startsWith("#") || (className.length() == 0)) { className = in.readLine(); continue; } if (className.endsWith(".class")) { throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className)); } try { classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e); } className = in.readLine(); } return classes; } finally { in.close(); } }
Example #28
Source File: ContextFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Look for jaxb.index file in the specified package and load it's contents * * @param pkg package name to search in * @param classLoader ClassLoader to search in * @return a List of Class objects to load, null if there weren't any * @throws IOException if there is an error reading the index file * @throws JAXBException if there are any errors in the index file */ private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException { final String resource = pkg.replace('.', '/') + "/jaxb.index"; final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); if (resourceAsStream == null) { return null; } BufferedReader in = new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); try { FinalArrayList<Class> classes = new FinalArrayList<Class>(); String className = in.readLine(); while (className != null) { className = className.trim(); if (className.startsWith("#") || (className.length() == 0)) { className = in.readLine(); continue; } if (className.endsWith(".class")) { throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className)); } try { classes.add(classLoader.loadClass(pkg + '.' + className)); } catch (ClassNotFoundException e) { throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e); } className = in.readLine(); } return classes; } finally { in.close(); } }
Example #29
Source File: StreamHeader12.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_2_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } else if (SOAP_1_2_RELAY.equals(localName)) { _isRelay = Util.parseBool(value); } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }
Example #30
Source File: StreamHeader11.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) { FinalArrayList<Attribute> atts = null; _role = SOAPConstants.URI_SOAP_ACTOR_NEXT; for (int i = 0; i < reader.getAttributeCount(); i++) { final String localName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); if (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(namespaceURI)) { if (SOAP_1_1_MUST_UNDERSTAND.equals(localName)) { _isMustUnderstand = Util.parseBool(value); } else if (SOAP_1_1_ROLE.equals(localName)) { if (value != null && value.length() > 0) { _role = value; } } } if(atts==null) { atts = new FinalArrayList<Attribute>(); } atts.add(new Attribute(namespaceURI,localName,value)); } return atts; }