changeset 557:64ca52b0bda8 jdk9-b46

Merge
author lana
date Mon, 12 Jan 2015 12:24:03 -0800
parents 4222060cacf2 bb4579bd7e6b
children 6c17d648d03e
files src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java src/java.xml.soap/share/classes/javax/xml/soap/AttachmentPart.java src/java.xml.soap/share/classes/javax/xml/soap/Detail.java src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java src/java.xml.soap/share/classes/javax/xml/soap/Name.java src/java.xml.soap/share/classes/javax/xml/soap/Node.java src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java src/java.xml.soap/share/classes/javax/xml/soap/Text.java src/java.xml.soap/share/classes/javax/xml/soap/package.html
diffstat 450 files changed, 36929 insertions(+), 36929 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * LazyEnvelopeSource provides the source to create lazy Envelope
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface LazyEnvelopeSource extends javax.xml.transform.Source {
-    /**
-     * Retrieve payload qname without materializing its contents
-     * @return
-     * @throws SOAPException
-     */
-    public QName getPayloadQName();
-    public XMLStreamReader readToBodyStarTag() throws XMLStreamException;
-    public XMLStreamReader readPayload();
-    public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException;
-    public boolean isPayloadStreamReader();
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-import javax.xml.soap.SOAPException;
-
-/**
- * An exception that signals that a SOAP exception has occurred. A
- * <code>SOAPExceptionImpl</code> object may contain a <code>String</code>
- * that gives the reason for the exception, an embedded
- * <code>Throwable</code> object, or both. This class provides methods
- * for retrieving reason messages and for retrieving the embedded
- * <code>Throwable</code> object.
- *
- * <P> Typical reasons for throwing a <code>SOAPExceptionImpl</code>
- * object are problems such as difficulty setting a header, not being
- * able to send a message, and not being able to get a connection with
- * the provider.  Reasons for embedding a <code>Throwable</code>
- * object include problems such as input/output errors or a parsing
- * problem, such as an error in parsing a header.
- */
-public class SOAPExceptionImpl extends SOAPException {
-    private Throwable cause;
-
-    /**
-     * Constructs a <code>SOAPExceptionImpl</code> object with no
-     * reason or embedded <code>Throwable</code> object.
-     */
-    public SOAPExceptionImpl() {
-        super();
-        this.cause = null;
-    }
-
-    /**
-     * Constructs a <code>SOAPExceptionImpl</code> object with the given
-     * <code>String</code> as the reason for the exception being thrown.
-     *
-     * @param reason a description of what caused the exception
-     */
-    public SOAPExceptionImpl(String reason) {
-        super(reason);
-        this.cause = null;
-    }
-
-    /**
-     * Constructs a <code>SOAPExceptionImpl</code> object with the given
-     * <code>String</code> as the reason for the exception being thrown
-     * and the given <code>Throwable</code> object as an embedded
-     * exception.
-     *
-     * @param reason a description of what caused the exception
-     * @param cause a <code>Throwable</code> object that is to
-     *        be embedded in this <code>SOAPExceptionImpl</code> object
-     */
-    public SOAPExceptionImpl(String reason, Throwable cause) {
-       super (reason);
-       initCause(cause);
-    }
-
-    /**
-     * Constructs a <code>SOAPExceptionImpl</code> object initialized
-     * with the given <code>Throwable</code> object.
-     */
-    public SOAPExceptionImpl(Throwable cause) {
-        super (cause.toString());
-        initCause(cause);
-    }
-
-    /**
-     * Returns the detail message for this <code>SOAPExceptionImpl</code>
-     * object.
-     * <P>
-     * If there is an embedded <code>Throwable</code> object, and if the
-     * <code>SOAPExceptionImpl</code> object has no detail message of its
-     * own, this method will return the detail message from the embedded
-     * <code>Throwable</code> object.
-     *
-     * @return the error or warning message for this
-     *         <code>SOAPExceptionImpl</code> or, if it has none, the
-     *         message of the embedded <code>Throwable</code> object,
-     *         if there is one
-     */
-    public String getMessage() {
-        String message = super.getMessage ();
-        if (message == null && cause != null) {
-            return cause.getMessage();
-        } else {
-            return message;
-        }
-    }
-
-    /**
-     * Returns the <code>Throwable</code> object embedded in this
-     * <code>SOAPExceptionImpl</code> if there is one. Otherwise, this method
-     * returns <code>null</code>.
-     *
-     * @return the embedded <code>Throwable</code> object or <code>null</code>
-     *         if there is none
-     */
-
-    public Throwable getCause() {
-        return cause;
-    }
-
-    /**
-     * Initializes the <code>cause</code> field of this <code>SOAPExceptionImpl</code>
-     * object with the given <code>Throwable</code> object.
-     * <P>
-     * This method can be called at most once.  It is generally called from
-     * within the constructor or immediately after the constructor has
-     * returned a new <code>SOAPExceptionImpl</code> object.
-     * If this <code>SOAPExceptionImpl</code> object was created with the
-     * constructor {@link #SOAPExceptionImpl(Throwable)} or
-     * {@link #SOAPExceptionImpl(String,Throwable)}, meaning that its
-     * <code>cause</code> field already has a value, this method cannot be
-     * called even once.
-     *
-     * @param  cause the <code>Throwable</code> object that caused this
-     *         <code>SOAPExceptionImpl</code> object to be thrown.  The value of this
-     *         parameter is saved for later retrieval by the
-     *         {@link #getCause()} method.  A <tt>null</tt> value is
-     *         permitted and indicates that the cause is nonexistent or
-     *         unknown.
-     * @return  a reference to this <code>SOAPExceptionImpl</code> instance
-     * @throws IllegalArgumentException if <code>cause</code> is this
-     *         <code>Throwable</code> object.  (A <code>Throwable</code> object
-     *         cannot be its own cause.)
-     * @throws IllegalStateException if this <code>SOAPExceptionImpl</code> object
-     *         was created with {@link #SOAPExceptionImpl(Throwable)} or
-     *         {@link #SOAPExceptionImpl(String,Throwable)}, or this
-     *         method has already been called on this <code>SOAPExceptionImpl</code>
-     *         object
-     */
-    public synchronized Throwable initCause(Throwable cause)
-    {
-        if(this.cause != null) {
-            throw new IllegalStateException("Can't override cause");
-        }
-        if(cause == this) {
-            throw new IllegalArgumentException("Self-causation not permitted");
-        }
-        this.cause = cause;
-
-        return this;
-    }
-
-    public void printStackTrace() {
-        super.printStackTrace();
-        if (cause != null) {
-            System.err.println("\nCAUSE:\n");
-            cause.printStackTrace();
-        }
-    }
-
-    public void printStackTrace(PrintStream s) {
-        super.printStackTrace(s);
-        if (cause != null) {
-            s.println("\nCAUSE:\n");
-            cause.printStackTrace(s);
-        }
-    }
-
-    public void printStackTrace(PrintWriter s) {
-        super.printStackTrace(s);
-        if (cause != null) {
-            s.println("\nCAUSE:\n");
-            cause.printStackTrace(s);
-        }
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import java.io.*;
-import java.lang.reflect.Method;
-import java.net.*;
-import java.security.*;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-/**
- * This represents a "connection" to the simple HTTP-based provider.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- * @author Rajiv Mordani (rajiv.mordani@sun.com)
- * @author Manveen Kaur (manveen.kaur@sun.com)
- *
- */
-class HttpSOAPConnection extends SOAPConnection {
-
-    public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url");
-    private static final String sunVmVendor = "http://java.sun.com/";
-    private static final String ibmVmVendor = "http://www.ibm.com/";
-    private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false;
-    private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false;
-    private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint";
-
-    protected static final Logger log =
-        Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
-                         "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
-
-
-    MessageFactory messageFactory = null;
-
-    boolean closed = false;
-
-    public HttpSOAPConnection() throws SOAPException {
-
-        try {
-            messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
-        } catch (NoSuchMethodError ex) {
-            //fallback to default SOAP 1.1 in this case for backward compatibility
-            messageFactory = MessageFactory.newInstance();
-        } catch (Exception ex) {
-            log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
-            throw new SOAPExceptionImpl("Unable to create message factory", ex);
-        }
-    }
-
-    public void close() throws SOAPException {
-        if (closed) {
-            log.severe("SAAJ0002.p2p.close.already.closed.conn");
-            throw new SOAPExceptionImpl("Connection already closed");
-        }
-
-        messageFactory = null;
-        closed = true;
-    }
-
-   public SOAPMessage call(SOAPMessage message, Object endPoint)
-        throws SOAPException {
-        if (closed) {
-            log.severe("SAAJ0003.p2p.call.already.closed.conn");
-            throw new SOAPExceptionImpl("Connection is closed");
-        }
-
-        Class urlEndpointClass = null;
-        ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        try {
-            if (loader != null) {
-                urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
-            } else {
-                urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
-            }
-        } catch (ClassNotFoundException ex) {
-            //Do nothing. URLEndpoint is available only when JAXM is there.
-            if (log.isLoggable(Level.FINEST))
-                log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
-        }
-
-        if (urlEndpointClass != null) {
-            if (urlEndpointClass.isInstance(endPoint)) {
-                String url = null;
-
-                try {
-                    Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
-                    url = (String) m.invoke(endPoint, (Object[])null);
-                } catch (Exception ex) {
-                    // TBD -- exception chaining
-                    log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex);
-                    throw new SOAPExceptionImpl(
-                        "Internal error: " + ex.getMessage());
-                }
-                try {
-                    endPoint = new URL(url);
-                } catch (MalformedURLException mex) {
-                    log.log(Level.SEVERE,"SAAJ0005.p2p.", mex);
-                    throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
-                }
-            }
-        }
-
-        if (endPoint instanceof java.lang.String) {
-            try {
-                endPoint = new URL((String) endPoint);
-            } catch (MalformedURLException mex) {
-                log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex);
-                throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
-            }
-        }
-
-        if (endPoint instanceof URL)
-            try {
-                SOAPMessage response = post(message, (URL)endPoint);
-                return response;
-            } catch (Exception ex) {
-                // TBD -- chaining?
-                throw new SOAPExceptionImpl(ex);
-            } else {
-            log.severe("SAAJ0007.p2p.bad.endPoint.type");
-            throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
-        }
-    }
-
-    SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException, IOException {
-        boolean isFailure = false;
-
-        URL url = null;
-        HttpURLConnection httpConnection = null;
-
-        int responseCode = 0;
-        try {
-            if (endPoint.getProtocol().equals("https"))
-                //if(!setHttps)
-                initHttps();
-            // Process the URL
-            URI uri = new URI(endPoint.toString());
-            String userInfo = uri.getRawUserInfo();
-
-            url = endPoint;
-
-            if (dL > 0)
-                d("uri: " + userInfo + " " + url + " " + uri);
-
-            // TBD
-            //    Will deal with https later.
-            if (!url.getProtocol().equalsIgnoreCase("http")
-                && !url.getProtocol().equalsIgnoreCase("https")) {
-                log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
-                throw new IllegalArgumentException(
-                    "Protocol "
-                        + url.getProtocol()
-                        + " not supported in URL "
-                        + url);
-            }
-            httpConnection = (HttpURLConnection) createConnection(url);
-
-            httpConnection.setRequestMethod("POST");
-
-            httpConnection.setDoOutput(true);
-            httpConnection.setDoInput(true);
-            httpConnection.setUseCaches(false);
-            httpConnection.setInstanceFollowRedirects(true);
-
-            if (message.saveRequired())
-                message.saveChanges();
-
-            MimeHeaders headers = message.getMimeHeaders();
-
-            Iterator it = headers.getAllHeaders();
-            boolean hasAuth = false; // true if we find explicit Auth header
-            while (it.hasNext()) {
-                MimeHeader header = (MimeHeader) it.next();
-
-                String[] values = headers.getHeader(header.getName());
-                if (values.length == 1)
-                    httpConnection.setRequestProperty(
-                        header.getName(),
-                        header.getValue());
-                else {
-                    StringBuffer concat = new StringBuffer();
-                    int i = 0;
-                    while (i < values.length) {
-                        if (i != 0)
-                            concat.append(',');
-                        concat.append(values[i]);
-                        i++;
-                    }
-
-                    httpConnection.setRequestProperty(
-                        header.getName(),
-                        concat.toString());
-                }
-
-                if ("Authorization".equals(header.getName())) {
-                    hasAuth = true;
-                    if (log.isLoggable(Level.FINE))
-                        log.fine("SAAJ0091.p2p.https.auth.in.POST.true");
-                }
-            }
-
-            if (!hasAuth && userInfo != null) {
-                initAuthUserInfo(httpConnection, userInfo);
-            }
-
-            OutputStream out = httpConnection.getOutputStream();
-            try {
-                message.writeTo(out);
-                out.flush();
-            } finally {
-                out.close();
-            }
-
-            httpConnection.connect();
-
-            try {
-
-                responseCode = httpConnection.getResponseCode();
-
-                // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
-                if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
-                    isFailure = true;
-                }
-                //else if (responseCode != HttpURLConnection.HTTP_OK)
-                //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207))
-                else if ((responseCode / 100) != 2) {
-                    log.log(Level.SEVERE,
-                            "SAAJ0008.p2p.bad.response",
-                            new String[] {httpConnection.getResponseMessage()});
-                    throw new SOAPExceptionImpl(
-                        "Bad response: ("
-                            + responseCode
-                            + httpConnection.getResponseMessage());
-
-                }
-            } catch (IOException e) {
-                // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
-                responseCode = httpConnection.getResponseCode();
-                if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
-                    isFailure = true;
-                } else {
-                    throw e;
-                }
-
-            }
-
-        } catch (SOAPException ex) {
-            throw ex;
-        } catch (Exception ex) {
-            log.severe("SAAJ0009.p2p.msg.send.failed");
-            throw new SOAPExceptionImpl("Message send failed", ex);
-        }
-
-        SOAPMessage response = null;
-        InputStream httpIn = null;
-        if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
-            try {
-                MimeHeaders headers = new MimeHeaders();
-
-                String key, value;
-
-                // Header field 0 is the status line so we skip it.
-
-                int i = 1;
-
-                while (true) {
-                    key = httpConnection.getHeaderFieldKey(i);
-                    value = httpConnection.getHeaderField(i);
-
-                    if (key == null && value == null)
-                        break;
-
-                    if (key != null) {
-                        StringTokenizer values =
-                            new StringTokenizer(value, ",");
-                        while (values.hasMoreTokens())
-                            headers.addHeader(key, values.nextToken().trim());
-                    }
-                    i++;
-                }
-
-                httpIn =
-                    (isFailure
-                        ? httpConnection.getErrorStream()
-                        : httpConnection.getInputStream());
-
-                byte[] bytes = readFully(httpIn);
-
-                int length =
-                    httpConnection.getContentLength() == -1
-                        ? bytes.length
-                        : httpConnection.getContentLength();
-
-                // If no reply message is returned,
-                // content-Length header field value is expected to be zero.
-                if (length == 0) {
-                    response = null;
-                    log.warning("SAAJ0014.p2p.content.zero");
-                } else {
-                    ByteInputStream in = new ByteInputStream(bytes, length);
-                    response = messageFactory.createMessage(headers, in);
-                }
-
-            } catch (SOAPException ex) {
-                throw ex;
-            } catch (Exception ex) {
-                log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex);
-                throw new SOAPExceptionImpl(
-                    "Unable to read response: " + ex.getMessage());
-            } finally {
-               if (httpIn != null)
-                   httpIn.close();
-               httpConnection.disconnect();
-            }
-        }
-        return response;
-    }
-
-    // Object identifies where the request should be sent.
-    // It is required to support objects of type String and java.net.URL.
-
-    public SOAPMessage get(Object endPoint) throws SOAPException {
-        if (closed) {
-            log.severe("SAAJ0011.p2p.get.already.closed.conn");
-            throw new SOAPExceptionImpl("Connection is closed");
-        }
-        Class urlEndpointClass = null;
-
-        try {
-            urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
-        } catch (Exception ex) {
-            //Do nothing. URLEndpoint is available only when JAXM is there.
-        }
-
-        if (urlEndpointClass != null) {
-            if (urlEndpointClass.isInstance(endPoint)) {
-                String url = null;
-
-                try {
-                    Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
-                    url = (String) m.invoke(endPoint, (Object[])null);
-                } catch (Exception ex) {
-                    log.severe("SAAJ0004.p2p.internal.err");
-                    throw new SOAPExceptionImpl(
-                        "Internal error: " + ex.getMessage());
-                }
-                try {
-                    endPoint = new URL(url);
-                } catch (MalformedURLException mex) {
-                    log.severe("SAAJ0005.p2p.");
-                    throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
-                }
-            }
-        }
-
-        if (endPoint instanceof java.lang.String) {
-            try {
-                endPoint = new URL((String) endPoint);
-            } catch (MalformedURLException mex) {
-                log.severe("SAAJ0006.p2p.bad.URL");
-                throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
-            }
-        }
-
-        if (endPoint instanceof URL)
-            try {
-                SOAPMessage response = doGet((URL)endPoint);
-                return response;
-            } catch (Exception ex) {
-                throw new SOAPExceptionImpl(ex);
-            } else
-            throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
-    }
-
-    SOAPMessage doGet(URL endPoint) throws SOAPException, IOException {
-        boolean isFailure = false;
-
-        URL url = null;
-        HttpURLConnection httpConnection = null;
-
-        int responseCode = 0;
-        try {
-            /// Is https GET allowed??
-            if (endPoint.getProtocol().equals("https"))
-                initHttps();
-            // Process the URL
-            URI uri = new URI(endPoint.toString());
-            String userInfo = uri.getRawUserInfo();
-
-            url = endPoint;
-
-            if (dL > 0)
-                d("uri: " + userInfo + " " + url + " " + uri);
-
-            // TBD
-            //    Will deal with https later.
-            if (!url.getProtocol().equalsIgnoreCase("http")
-                && !url.getProtocol().equalsIgnoreCase("https")) {
-                log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
-                throw new IllegalArgumentException(
-                    "Protocol "
-                        + url.getProtocol()
-                        + " not supported in URL "
-                        + url);
-            }
-            httpConnection = (HttpURLConnection) createConnection(url);
-
-            httpConnection.setRequestMethod("GET");
-
-            httpConnection.setDoOutput(true);
-            httpConnection.setDoInput(true);
-            httpConnection.setUseCaches(false);
-            httpConnection.setFollowRedirects(true);
-
-            httpConnection.connect();
-
-            try {
-
-                responseCode = httpConnection.getResponseCode();
-
-                // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
-                if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
-                    isFailure = true;
-                } else if ((responseCode / 100) != 2) {
-                    log.log(Level.SEVERE,
-                            "SAAJ0008.p2p.bad.response",
-                            new String[] { httpConnection.getResponseMessage()});
-                    throw new SOAPExceptionImpl(
-                        "Bad response: ("
-                            + responseCode
-                            + httpConnection.getResponseMessage());
-
-                }
-            } catch (IOException e) {
-                // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
-                responseCode = httpConnection.getResponseCode();
-                if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
-                    isFailure = true;
-                } else {
-                    throw e;
-                }
-
-            }
-
-        } catch (SOAPException ex) {
-            throw ex;
-        } catch (Exception ex) {
-            log.severe("SAAJ0012.p2p.get.failed");
-            throw new SOAPExceptionImpl("Get failed", ex);
-        }
-
-        SOAPMessage response = null;
-        InputStream httpIn = null;
-        if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
-            try {
-                MimeHeaders headers = new MimeHeaders();
-
-                String key, value;
-
-                // Header field 0 is the status line so we skip it.
-
-                int i = 1;
-
-                while (true) {
-                    key = httpConnection.getHeaderFieldKey(i);
-                    value = httpConnection.getHeaderField(i);
-
-                    if (key == null && value == null)
-                        break;
-
-                    if (key != null) {
-                        StringTokenizer values =
-                            new StringTokenizer(value, ",");
-                        while (values.hasMoreTokens())
-                            headers.addHeader(key, values.nextToken().trim());
-                    }
-                    i++;
-                }
-
-                httpIn =
-                        (isFailure
-                        ? httpConnection.getErrorStream()
-                        : httpConnection.getInputStream());
-                // If no reply message is returned,
-                // content-Length header field value is expected to be zero.
-                // java SE 6 documentation says :
-                // available() : an estimate of the number of bytes that can be read
-                //(or skipped over) from this input stream without blocking
-                //or 0 when it reaches the end of the input stream.
-                if ((httpIn == null )
-                        || (httpConnection.getContentLength() == 0)
-                        || (httpIn.available() == 0)) {
-                    response = null;
-                    log.warning("SAAJ0014.p2p.content.zero");
-                } else {
-                    response = messageFactory.createMessage(headers, httpIn);
-                }
-
-            } catch (SOAPException ex) {
-                throw ex;
-            } catch (Exception ex) {
-                log.log(Level.SEVERE,
-                        "SAAJ0010.p2p.cannot.read.resp",
-                        ex);
-                throw new SOAPExceptionImpl(
-                    "Unable to read response: " + ex.getMessage());
-            } finally {
-               if (httpIn != null)
-                   httpIn.close();
-               httpConnection.disconnect();
-            }
-        }
-        return response;
-    }
-
-    private byte[] readFully(InputStream istream) throws IOException {
-        ByteArrayOutputStream bout = new ByteArrayOutputStream();
-        byte[] buf = new byte[1024];
-        int num = 0;
-
-        while ((num = istream.read(buf)) != -1) {
-            bout.write(buf, 0, num);
-        }
-
-        byte[] ret = bout.toByteArray();
-
-        return ret;
-    }
-
-    //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
-    //private static String SSL_PROVIDER =
-      //  "com.sun.net.ssl.internal.ssl.Provider";
-    private static final String SSL_PKG;
-    private static final String SSL_PROVIDER;
-
-    static {
-        if (isIBMVM) {
-            SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
-            SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
-        } else {
-            //if not IBM VM default to Sun.
-            SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
-            SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
-        }
-    }
-
-    private void initHttps() {
-        //if(!setHttps) {
-        String pkgs = SAAJUtil.getSystemProperty("java.protocol.handler.pkgs");
-        if (log.isLoggable(Level.FINE))
-            log.log(Level.FINE, "SAAJ0053.p2p.providers", new String[] { pkgs });
-
-        if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) {
-            if (pkgs == null)
-                pkgs = SSL_PKG;
-            else
-                pkgs = pkgs + "|" + SSL_PKG;
-            System.setProperty("java.protocol.handler.pkgs", pkgs);
-            if (log.isLoggable(Level.FINE))
-                log.log(Level.FINE, "SAAJ0054.p2p.set.providers",
-                        new String[] { pkgs });
-            try {
-                Class c = Class.forName(SSL_PROVIDER);
-                Provider p = (Provider) c.newInstance();
-                Security.addProvider(p);
-                if (log.isLoggable(Level.FINE))
-                    log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider",
-                            new String[] { SSL_PROVIDER });
-                //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER);
-                //setHttps = true;
-            } catch (Exception ex) {
-            }
-        }
-        //}
-    }
-
-    private void initAuthUserInfo(HttpURLConnection conn, String userInfo) {
-        String user;
-        String password;
-        if (userInfo != null) { // get the user and password
-            //System.out.println("UserInfo= " + userInfo );
-            int delimiter = userInfo.indexOf(':');
-            if (delimiter == -1) {
-                user = ParseUtil.decode(userInfo);
-                password = null;
-            } else {
-                user = ParseUtil.decode(userInfo.substring(0, delimiter++));
-                password = ParseUtil.decode(userInfo.substring(delimiter));
-            }
-
-            String plain = user + ":";
-            byte[] nameBytes = plain.getBytes();
-            byte[] passwdBytes = (password == null ? new byte[0] : password
-                    .getBytes());
-
-            // concatenate user name and password bytes and encode them
-            byte[] concat = new byte[nameBytes.length + passwdBytes.length];
-
-            System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length);
-            System.arraycopy(
-                passwdBytes,
-                0,
-                concat,
-                nameBytes.length,
-                passwdBytes.length);
-            String auth = "Basic " + new String(Base64.encode(concat));
-            conn.setRequestProperty("Authorization", auth);
-            if (dL > 0)
-                d("Adding auth " + auth);
-        }
-    }
-
-    private static final int dL = 0;
-    private void d(String s) {
-        log.log(Level.SEVERE,
-                "SAAJ0013.p2p.HttpSOAPConnection",
-                new String[] { s });
-        System.err.println("HttpSOAPConnection: " + s);
-    }
-
-    private java.net.HttpURLConnection createConnection(URL endpoint)
-        throws IOException {
-        return (HttpURLConnection) endpoint.openConnection();
-    }
-
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import javax.xml.soap.*;
-
-/**
- * Implementation of the SOAPConnectionFactory
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public class HttpSOAPConnectionFactory extends SOAPConnectionFactory {
-
-    public SOAPConnection createConnection()
-        throws SOAPException
-    {
-        return new HttpSOAPConnection();
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Unable to create Message Factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connection already closed (from close method)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connection already closed (from call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Internal error
-SAAJ0005.p2p.=SAAJ0005: Bad URL (endPoint instance of javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Bad URL (endPoint instance of String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Bad endPoint type (endPoint instance of URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Bad Response; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Message send failed
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Unable to read response
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connection already closed (from get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get failed
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Invalid reply message. Content length of reply was zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxy host: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxy Port: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocol not supported in URL, must be http or https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Providers {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Setting Providers {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: Added SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint is available only when JAXM is there
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS Authorization in POST set to true
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Nachrichten-Factory kann nicht erstellt werden
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Verbindung ist bereits beendet (mit close-Methode)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Verbindung ist bereits beendet (mit call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Interner Fehler
-SAAJ0005.p2p.=SAAJ0005: Ung\u00FCltige URL (endPoint-Instanz von javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Ung\u00FCltige URL (endPoint-Instanz von Zeichenfolge)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Ung\u00FCltiger endPoint-Typ (endPoint-Instanz von URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Ung\u00FCltige Antwort; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Nachricht konnte nicht gesendet werden
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Antwort konnte nicht gelesen werden
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Verbindung ist bereits beendet (mit get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get-Vorgang nicht erfolgreich
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Ung\u00FCltige Antwortnachricht. Contentl\u00E4nge von Antwort war null.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxyhost: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxyport: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protokoll in URL nicht unterst\u00FCtzt, muss http oder https sein
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Provider {0} werden festgelegt
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} hinzugef\u00FCgt
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint ist nur verf\u00FCgbar, wenn JAXM vorhanden ist
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS-Autorisierung in POST auf "True" festgelegt
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: no se ha podido crear la f\u00E1brica de mensajes
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: la conexi\u00F3n ya est\u00E1 cerrada (desde el m\u00E9todo de cierre)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: la conexi\u00F3n ya est\u00E1 cerrada (desde la llamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: error interno
-SAAJ0005.p2p.=SAAJ0005: URL err\u00F3nea (instancia endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL err\u00F3nea (instancia endPoint de String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo endPoint err\u00F3neo (instancia endPoint de URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: respuesta err\u00F3nea; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: fallo de env\u00EDo de mensaje
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: no se ha podido leer la respuesta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: la conexi\u00F3n ya est\u00E1 cerrada (desde la obtenci\u00F3n)
-SAAJ0012.p2p.get.failed=SAAJ0012: fallo de obtenci\u00F3n
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensaje de respuesta no v\u00E1lido. La longitud del contenido de respuesta es cero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host de proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Puerto de proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: el protocolo no est\u00E1 soportado en la URL. Debe ser http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: proveedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definici\u00F3n de Proveedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: se ha agregado SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint s\u00F3lo est\u00E1 disponible cuando JAXM est\u00E1 all\u00ED
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: la autorizaci\u00F3n de HTTPS en POST se ha definido en true
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001 : impossible de cr\u00E9er une fabrique de messages
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode de fermeture)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de l'appel)
-SAAJ0004.p2p.internal.err=SAAJ0004 : erreur interne
-SAAJ0005.p2p.=SAAJ0005 : URL incorrecte (instance d'adresse de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006 : URL incorrecte (instance d'adresse de la cha\u00EEne)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007 : type d'adresse incorrect (instance d'adresse de l'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008 : r\u00E9ponse incorrecte ; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009 : \u00E9chec de l'envoi du message
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010 : impossible de lire la r\u00E9ponse
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode get)
-SAAJ0012.p2p.get.failed=SAAJ0012 : \u00E9chec de la m\u00E9thode get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013 : HttpSOAPConnection : {0}
-SAAJ0014.p2p.content.zero=SAAJ0014 : message de r\u00E9ponse non valide. La longueur du contenu de la r\u00E9ponse \u00E9tait de z\u00E9ro.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050 : h\u00F4te proxy : {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051 : port proxy : {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052 : protocole non pris en charge dans l'URL, il doit s'agir de http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053 : fournisseurs {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054 : d\u00E9finition des fournisseurs {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055 : SSL_PROVIDER {0} ajout\u00E9
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090 : URLEndpoint est disponible uniquement lorsque JAXM est pr\u00E9sent
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091 : autorisation HTTPS dans POST d\u00E9finie sur True
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Impossibile creare il message factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connessione gi\u00E0 chiusa (dal metodo close)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connessione gi\u00E0 chiusa (dal metodo call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Errore interno
-SAAJ0005.p2p.=SAAJ0005: URL non valido (istanza endPoint di javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL non valido (istanza endPoint di String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Tipo endPoint non valido (istanza endPoint dell'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Risposta non valida; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Invio del messaggio non riuscito
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Impossibile leggere la risposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connessione gi\u00E0 chiusa (dal metodo get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Metodo get non riuscito
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Messaggio di risposta non valido. La lunghezza del contenuto della risposta era pari a zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocollo non supportato nell'URL, deve essere http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Impostazione dei provider {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} aggiunto
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: L'endpoint dell'URL \u00E8 disponibile solo quando \u00E8 presente JAXM
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: Autorizzazione HTTPS in POST impostata su true
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: (close\u30E1\u30BD\u30C3\u30C9\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: (call\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u30A8\u30E9\u30FC
-SAAJ0005.p2p.=SAAJ0005: \u7121\u52B9\u306AURL (javax.xml.messaging.URLEndpoint\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u7121\u52B9\u306AURL (\u6587\u5B57\u5217\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u7121\u52B9\u306AendPoint\u30BF\u30A4\u30D7(URL\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u30E1\u30C3\u30BB\u30FC\u30B8\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: (get\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u5FDC\u7B54\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7121\u52B9\u3067\u3059\u3002\u5FDC\u7B54\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u9577\u304C\u30BC\u30ED\u3067\u3057\u305F\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DB\u30B9\u30C8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u3059\u3002http\u307E\u305F\u306Fhttps\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u30D7\u30ED\u30D0\u30A4\u30C0{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u30D7\u30ED\u30D0\u30A4\u30C0{0}\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306FJAXM\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u3067\u3059
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\u306EHTTPS\u8A8D\u8A3C\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: close \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \uD638\uCD9C\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0004.p2p.internal.err=SAAJ0004: \uB0B4\uBD80 \uC624\uB958
-SAAJ0005.p2p.=SAAJ0005: URL(javax.xml.messaging.URLEndpoint\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL(\uBB38\uC790\uC5F4\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \uB05D\uC810 \uC720\uD615(URL\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0008.p2p.bad.response=SAAJ0008: \uC798\uBABB\uB41C \uC751\uB2F5: {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \uBA54\uC2DC\uC9C0 \uC804\uC1A1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \uC751\uB2F5\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \uAC00\uC838\uC624\uAE30\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0012.p2p.get.failed=SAAJ0012: \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \uD68C\uC2E0 \uBA54\uC2DC\uC9C0\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uD68C\uC2E0\uC758 \uCF58\uD150\uCE20 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \uD504\uB85D\uC2DC \uD638\uC2A4\uD2B8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \uD504\uB85D\uC2DC \uD3EC\uD2B8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD504\uB85C\uD1A0\uCF5C\uC785\uB2C8\uB2E4. http \uB610\uB294 https\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: {0} \uC81C\uACF5\uC790
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: {0} \uC81C\uACF5\uC790\uB97C \uC124\uC815\uD558\uB294 \uC911
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\uC744(\uB97C) \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: JAXM\uC774 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC URLEndpoint\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\uC758 HTTPS \uAD8C\uD55C \uBD80\uC5EC\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: n\u00E3o \u00E9 poss\u00EDvel criar a factory da mensagem
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: a conex\u00E3o j\u00E1 foi fechada (do m\u00E9todo de fechamento)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: conex\u00E3o j\u00E1 fechada (da chamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: erro interno
-SAAJ0005.p2p.=SAAJ0005: URL incorreto (a inst\u00E2ncia do endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL incorreto (inst\u00E2ncia de endPoint da String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo de endPoint incorreto (inst\u00E2ncia de endPoint do URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Resposta Incorreta; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: falha no envio da mensagem
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: n\u00E3o \u00E9 poss\u00EDvel ler a resposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: conex\u00E3o j\u00E1 fechada (de get)
-SAAJ0012.p2p.get.failed=SAAJ0012: falha de get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensagem de resposta inv\u00E1lida. O tamanho do conte\u00FAdo da resposta era zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: protocolo n\u00E3o suportado no URL, deve ser http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: provedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definindo provedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} adicionado
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint est\u00E1 dispon\u00EDvel s\u00F3 quando JAXM est\u00E1 presente
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: autoriza\u00E7\u00E3o de HTTPS no POST definida como verdadeira
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F\u5DE5\u5382
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE close \u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE\u8C03\u7528)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u9519\u8BEF
-SAAJ0005.p2p.=SAAJ0005: URL \u9519\u8BEF (javax.xml.messaging.URLEndpoint \u7684 endPoint \u5B9E\u4F8B)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL \u9519\u8BEF (\u5B57\u7B26\u4E32\u7684 endPoint \u5B9E\u4F8B)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: endPoint \u7C7B\u578B\u9519\u8BEF (URL \u7684 endPoint \u5B9E\u4F8B)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u54CD\u5E94\u9519\u8BEF; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u672A\u80FD\u53D1\u9001\u6D88\u606F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE get \u65B9\u6CD5)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get \u5931\u8D25
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u56DE\u590D\u6D88\u606F\u65E0\u6548\u3002\u56DE\u590D\u7684\u5185\u5BB9\u957F\u5EA6\u4E3A\u96F6\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u673A: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u7AEF\u53E3: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL \u4E2D\u4E0D\u652F\u6301\u534F\u8BAE, \u5FC5\u987B\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u65B9{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8BBE\u7F6E\u63D0\u4F9B\u65B9{0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u6DFB\u52A0 SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u4F7F\u7528 JAXM \u65F6, URLEndpoint \u624D\u53EF\u7528
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6743\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F\u8655\u7406\u7AD9
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u95DC\u9589\u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u547C\u53EB)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5167\u90E8\u932F\u8AA4
-SAAJ0005.p2p.=SAAJ0005: \u932F\u8AA4\u7684 URL (javax.xml.messaging.URLEndpoint \u7684 endPoint \u57F7\u884C\u8655\u7406)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u932F\u8AA4\u7684 URL (\u5B57\u4E32\u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u932F\u8AA4\u7684 endPoint \u985E\u578B (URL \u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u932F\u8AA4\u7684\u56DE\u61C9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u8A0A\u606F\u50B3\u9001\u5931\u6557
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u7121\u6CD5\u8B80\u53D6\u56DE\u61C9
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u53D6\u5F97)
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u5931\u6557
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u7121\u6548\u7684\u56DE\u8986\u8A0A\u606F. \u56DE\u8986\u7684\u5167\u5BB9\u9577\u5EA6\u70BA\u96F6.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u6A5F: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: \u4E0D\u652F\u63F4 URL \u4E2D\u7684\u5354\u5B9A, \u5FC5\u9808\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u8005 {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8A2D\u5B9A\u63D0\u4F9B\u8005 {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u65B0\u589E SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u6709 JAXM \u6642\u624D\u80FD\u4F7F\u7528 URLEndpoint
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6B0A\u8A2D\u70BA true
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)Header.java    1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The Header class stores a name/value pair to represent headers.
- *
- * @author John Mani
- */
-
-public interface Header {
-
-    /**
-     * Returns the name of this header.
-     *
-     * @return          name of the header
-     */
-    String getName();
-
-    /**
-     * Returns the value of this header.
-     *
-     * @return          value of the header
-     */
-    String getValue();
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MessagingException.java        1.10 02/06/13
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The base class for all exceptions thrown by the Messaging classes
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class MessagingException extends Exception {
-
-    /**
-     * The next exception in the chain.
-     *
-     * @serial
-     */
-    private Exception next;
-
-    /**
-     * Constructs a MessagingException with no detail message.
-     */
-    public MessagingException() {
-        super();
-    }
-
-    /**
-     * Constructs a MessagingException with the specified detail message.
-     * @param s         the detail message
-     */
-    public MessagingException(String s) {
-        super(s);
-    }
-
-    /**
-     * Constructs a MessagingException with the specified
-     * Exception and detail message. The specified exception is chained
-     * to this exception.
-     * @param s         the detail message
-     * @param e         the embedded exception
-     * @see     #getNextException
-     * @see     #setNextException
-     */
-    public MessagingException(String s, Exception e) {
-        super(s);
-        next = e;
-    }
-
-    /**
-     * Get the next exception chained to this one. If the
-     * next exception is a MessagingException, the chain
-     * may extend further.
-     *
-     * @return  next Exception, null if none.
-     */
-    public synchronized Exception getNextException() {
-        return next;
-    }
-
-    /**
-     * Add an exception to the end of the chain. If the end
-     * is <strong>not</strong> a MessagingException, this
-     * exception cannot be added to the end.
-     *
-     * @param   ex      the new end of the Exception chain
-     * @return          <code>true</code> if the this Exception
-     *                  was added, <code>false</code> otherwise.
-     */
-    public synchronized boolean setNextException(Exception ex) {
-        Exception theEnd = this;
-        while (theEnd instanceof MessagingException &&
-               ((MessagingException)theEnd).next != null) {
-            theEnd = ((MessagingException)theEnd).next;
-        }
-        // If the end is a MessagingException, we can add this
-        // exception to the chain.
-        if (theEnd instanceof MessagingException) {
-            ((MessagingException)theEnd).next = ex;
-            return true;
-        } else
-            return false;
-    }
-
-    /**
-     * Produce the message, include the message from the nested
-     * exception if there is one.
-     */
-    public String getMessage() {
-        if (next == null)
-            return super.getMessage();
-        Exception n = next;
-        String s = super.getMessage();
-        StringBuffer sb = new StringBuffer(s == null ? "" : s);
-        while (n != null) {
-            sb.append(";\n  nested exception is:\n\t");
-            if (n instanceof MessagingException) {
-                MessagingException mex = (MessagingException)n;
-                sb.append(n.getClass().toString());
-                String msg = mex.getSuperMessage();
-                if (msg != null) {
-                    sb.append(": ");
-                    sb.append(msg);
-                }
-                n = mex.next;
-            } else {
-                sb.append(n.toString());
-                n = null;
-            }
-        }
-        return sb.toString();
-    }
-
-    private String getSuperMessage() {
-        return super.getMessage();
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MultipartDataSource.java       1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
-
-import javax.activation.DataSource;
-
-/**
- * MultipartDataSource is a <code>DataSource</code> that contains body
- * parts.  This allows "mail aware" <code>DataContentHandlers</code> to
- * be implemented more efficiently by being aware of such
- * <code>DataSources</code> and using the appropriate methods to access
- * <code>BodyParts</code>. <p>
- *
- * Note that the data of a MultipartDataSource is also available as
- * an input stream. <p>
- *
- * This interface will typically be implemented by providers that
- * preparse multipart bodies, for example an IMAP provider.
- *
- * @version     1.6, 02/03/27
- * @author      John Mani
- * @see         javax.activation.DataSource
- */
-
-public interface MultipartDataSource extends DataSource {
-
-    /**
-     * Return the number of enclosed MimeBodyPart objects.
-     *
-     * @return          number of parts
-     */
-    public int getCount();
-
-    /**
-     * Get the specified MimeBodyPart.  Parts are numbered starting at 0.
-     *
-     * @param index     the index of the desired MimeBodyPart
-     * @return          the MimeBodyPart
-     * @exception       IndexOutOfBoundsException if the given index
-     *                  is out of range.
-     * @exception       MessagingException
-     */
-    public MimeBodyPart getBodyPart(int index) throws MessagingException;
-
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,765 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeMultipart.java     1.31 03/01/29
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.util.BitSet;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-/**
- * The MimeMultipart class is an implementation of the abstract Multipart
- * class that uses MIME conventions for the multipart data. <p>
- *
- * A MimeMultipart is obtained from a MimePart whose primary type
- * is "multipart" (by invoking the part's <code>getContent()</code> method)
- * or it can be created by a client as part of creating a new MimeMessage. <p>
- *
- * The default multipart subtype is "mixed".  The other multipart
- * subtypes, such as "alternative", "related", and so on, can be
- * implemented as subclasses of MimeMultipart with additional methods
- * to implement the additional semantics of that type of multipart
- * content. The intent is that service providers, mail JavaBean writers
- * and mail clients will write many such subclasses and their Command
- * Beans, and will install them into the JavaBeans Activation
- * Framework, so that any JavaMail implementation and its clients can
- * transparently find and use these classes. Thus, a MIME multipart
- * handler is treated just like any other type handler, thereby
- * decoupling the process of providing multipart handlers from the
- * JavaMail API. Lacking these additional MimeMultipart subclasses,
- * all subtypes of MIME multipart data appear as MimeMultipart objects. <p>
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the <code>MimeMultipart(String subtype)</code>
- * constructor.  For example, to create a "multipart/alternative" object,
- * use <code>new MimeMultipart("alternative")</code>.
- *
- */
-
-//TODO: cleanup the SharedInputStream handling
-public  class BMMimeMultipart extends MimeMultipart {
-
-    /*
-     * When true it indicates parsing hasnt been done at all
-     */
-    private boolean begining = true;
-
-    int[] bcs = new int[256];
-    int[] gss = null;
-    private static final int BUFFER_SIZE = 4096;
-    private byte[] buffer = new byte[BUFFER_SIZE];
-    private byte[] prevBuffer = new byte[BUFFER_SIZE];
-    private BitSet lastPartFound = new BitSet(1);
-
-    // cached inputstream which is possibly partially consumed
-    private InputStream in = null;
-    private String boundary = null;
-    // current stream position, set to -1 on EOF
-    int b = 0;
-
-    // property to indicate if lazyAttachments is ON
-    private boolean lazyAttachments = false;
-
-    /**
-     * Default constructor. An empty MimeMultipart object
-     * is created. Its content type is set to "multipart/mixed".
-     * A unique boundary string is generated and this string is
-     * setup as the "boundary" parameter for the
-     * <code>contentType</code> field. <p>
-     *
-     * MimeBodyParts may be added later.
-     */
-    public BMMimeMultipart() {
-        super();
-        //this("mixed");
-    }
-
-    /**
-     * Construct a MimeMultipart object of the given subtype.
-     * A unique boundary string is generated and this string is
-     * setup as the "boundary" parameter for the
-     * <code>contentType</code> field. <p>
-     *
-     * MimeBodyParts may be added later.
-     */
-    public BMMimeMultipart(String subtype) {
-        super(subtype);
-        /*
-         * Compute a boundary string.
-        String boundary = UniqueValue.getUniqueBoundaryValue();
-        ContentType cType = new ContentType("multipart", subtype, null);
-        contentType.setParameter("boundary", boundary);
-         */
-    }
-
-    /**
-     * Constructs a MimeMultipart object and its bodyparts from the
-     * given DataSource. <p>
-     *
-     * This constructor handles as a special case the situation where the
-     * given DataSource is a MultipartDataSource object.  In this case, this
-     * method just invokes the superclass (i.e., Multipart) constructor
-     * that takes a MultipartDataSource object. <p>
-     *
-     * Otherwise, the DataSource is assumed to provide a MIME multipart
-     * byte stream.  The <code>parsed</code> flag is set to false.  When
-     * the data for the body parts are needed, the parser extracts the
-     * "boundary" parameter from the content type of this DataSource,
-     * skips the 'preamble' and reads bytes till the terminating
-     * boundary and creates MimeBodyParts for each part of the stream.
-     *
-     * @param   ds      DataSource, can be a MultipartDataSource
-     */
-    public BMMimeMultipart(DataSource ds, ContentType ct)
-        throws MessagingException {
-        super(ds,ct);
-        boundary = ct.getParameter("boundary");
-        /*
-        if (ds instanceof MultipartDataSource) {
-            // ask super to do this for us.
-            setMultipartDataSource((MultipartDataSource)ds);
-            return;
-        }
-
-        // 'ds' was not a MultipartDataSource, we have
-        // to parse this ourself.
-        parsed = false;
-        this.ds = ds;
-        if (ct==null)
-            contentType = new ContentType(ds.getContentType());
-        else
-            contentType = ct;
-       */
-
-    }
-
-    public InputStream initStream() throws MessagingException {
-
-        if (in == null) {
-            try {
-                in = ds.getInputStream();
-                if (!(in instanceof ByteArrayInputStream) &&
-                    !(in instanceof BufferedInputStream) &&
-                    !(in instanceof SharedInputStream))
-                    in = new BufferedInputStream(in);
-            } catch (Exception ex) {
-                throw new MessagingException("No inputstream from datasource");
-            }
-
-            if (!in.markSupported()) {
-                throw new MessagingException(
-                    "InputStream does not support Marking");
-            }
-        }
-        return in;
-    }
-
-    /**
-     * Parse the InputStream from our DataSource, constructing the
-     * appropriate MimeBodyParts.  The <code>parsed</code> flag is
-     * set to true, and if true on entry nothing is done.  This
-     * method is called by all other methods that need data for
-     * the body parts, to make sure the data has been parsed.
-     *
-     * @since   JavaMail 1.2
-     */
-    protected  void parse() throws  MessagingException {
-        if (parsed)
-            return;
-
-        initStream();
-
-        SharedInputStream sin = null;
-        if (in instanceof SharedInputStream) {
-            sin = (SharedInputStream)in;
-        }
-
-        String bnd = "--" + boundary;
-        byte[] bndbytes = ASCIIUtility.getBytes(bnd);
-        try {
-            parse(in, bndbytes, sin);
-        } catch (IOException ioex) {
-            throw new MessagingException("IO Error", ioex);
-        } catch (Exception ex) {
-            throw new MessagingException("Error", ex);
-        }
-
-        parsed = true;
-    }
-
-    public boolean lastBodyPartFound() {
-        return lastPartFound.get(0);
-    }
-
-    public MimeBodyPart getNextPart(
-        InputStream stream, byte[] pattern, SharedInputStream sin)
-        throws Exception {
-
-        if (!stream.markSupported()) {
-            throw new Exception("InputStream does not support Marking");
-        }
-
-        if (begining) {
-            compile(pattern);
-            if (!skipPreamble(stream, pattern, sin)) {
-                throw new Exception(
-                    "Missing Start Boundary, or boundary does not start on a new line");
-            }
-            begining = false;
-        }
-
-        if (lastBodyPartFound()) {
-            throw new Exception("No parts found in Multipart InputStream");
-        }
-
-        if (sin != null) {
-            long start = sin.getPosition();
-            b = readHeaders(stream);
-            if (b == -1) {
-                throw new Exception(
-                    "End of Stream encountered while reading part headers");
-            }
-            long[] v = new long[1];
-            v[0] = -1; // just to ensure the code later sets it correctly
-            b = readBody(stream, pattern, v, null, sin);
-            // looks like this check has to be disabled
-            // it is allowed to have Mime Package without closing boundary
-            if (!ignoreMissingEndBoundary) {
-                if ((b == -1) && !lastBodyPartFound()) {
-                    throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
-                }
-            }
-            long end = v[0];
-            MimeBodyPart mbp = createMimeBodyPart(sin.newStream(start, end));
-            addBodyPart(mbp);
-            return mbp;
-
-        } else {
-            InternetHeaders headers = createInternetHeaders(stream);
-            ByteOutputStream baos = new ByteOutputStream();
-            b = readBody(stream, pattern, null,baos, null);
-            // looks like this check has to be disabled
-            // in the old impl it is allowed to have Mime Package
-            // without closing boundary
-            if (!ignoreMissingEndBoundary) {
-                if ((b == -1) && !lastBodyPartFound()) {
-                    throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
-                }
-            }
-            MimeBodyPart mbp = createMimeBodyPart(
-                headers, baos.getBytes(), baos.getCount());
-            addBodyPart(mbp);
-            return mbp;
-        }
-
-    }
-
-    public boolean parse(
-        InputStream stream, byte[] pattern, SharedInputStream sin)
-        throws Exception {
-
-        while (!lastPartFound.get(0) && (b != -1)) {
-           getNextPart(stream, pattern, sin);
-        }
-        return true;
-    }
-
-    private int readHeaders(InputStream is) throws Exception {
-        // if the headers are to end properly then there has to be CRLF
-        // actually we just need to mark the start and end positions
-        int b = is.read();
-        while(b != -1) {
-            // when it is a shared input stream no need to copy
-            if (b == '\r') {
-                b = is.read();
-                if (b == '\n') {
-                    b = is.read();
-                    if (b == '\r') {
-                        b = is.read();
-                        if (b == '\n') {
-                           return b;
-                        } else {
-                            continue;
-                        }
-                    } else {
-                        continue;
-                    }
-                } else {
-                    continue;
-                }
-            }
-            b = is.read();
-        }
-        if (b == -1) {
-            throw new Exception(
-            "End of inputstream while reading Mime-Part Headers");
-        }
-        return b;
-    }
-
-    private int readBody(
-        InputStream is, byte[] pattern, long[] posVector,
-        ByteOutputStream baos, SharedInputStream sin)
-        throws Exception {
-        if (!find(is, pattern, posVector, baos, sin)) {
-            throw new Exception(
-            "Missing boundary delimitier while reading Body Part");
-        }
-        return b;
-    }
-
-    private boolean skipPreamble(
-        InputStream is, byte[] pattern, SharedInputStream sin)
-        throws Exception {
-        if (!find(is, pattern, sin)) {
-            return false;
-        }
-        if (lastPartFound.get(0)) {
-            throw new Exception(
-            "Found closing boundary delimiter while trying to skip preamble");
-        }
-        return true;
-    }
-
-
-    public int  readNext(InputStream is, byte[] buff, int patternLength,
-        BitSet eof, long[] posVector, SharedInputStream sin)
-        throws Exception {
-
-        int bufferLength = is.read(buffer, 0, patternLength);
-        if (bufferLength == -1) {
-           eof.flip(0);
-        } else if (bufferLength < patternLength) {
-            //repeatedly read patternLength - bufferLength
-            int temp = 0;
-            long pos = 0;
-            int i = bufferLength;
-            for (; i < patternLength; i++) {
-                if (sin != null) {
-                    pos = sin.getPosition();
-                }
-                temp = is.read();
-                if (temp == -1) {
-                    eof.flip(0);
-                    if (sin != null) {
-                        posVector[0] = pos;
-                    }
-                    break;
-                }
-                buffer[i] = (byte)temp;
-            }
-            bufferLength=i;
-        }
-        return bufferLength;
-    }
-
-    public boolean find(InputStream is, byte[] pattern, SharedInputStream sin)
-        throws Exception {
-        int i;
-        int l = pattern.length;
-        int lx = l -1;
-        BitSet eof = new BitSet(1);
-        long[] posVector = new long[1];
-
-        while (true) {
-            is.mark(l);
-            readNext(is, buffer, l, eof, posVector, sin);
-            if (eof.get(0)) {
-                // End of stream
-                return false;
-            }
-
-            /*
-            if (bufferLength < l) {
-                //is.reset();
-                return false;
-            }*/
-
-            for(i = lx; i >= 0; i--) {
-                if (buffer[i] != pattern[i]) {
-                    break;
-                }
-            }
-
-            if (i < 0) {
-                // found the boundary, skip *LWSP-char and CRLF
-                if (!skipLWSPAndCRLF(is)) {
-                    throw new Exception("Boundary does not terminate with CRLF");
-                }
-                return true;
-            }
-
-            int s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
-            is.reset();
-            is.skip(s);
-        }
-    }
-
-    public boolean find(
-        InputStream is, byte[] pattern, long[] posVector,
-        ByteOutputStream out, SharedInputStream sin) throws Exception {
-        int i;
-        int l = pattern.length;
-        int lx = l -1;
-        int bufferLength = 0;
-        int s = 0;
-        long endPos = -1;
-        byte[] tmp = null;
-
-        boolean first = true;
-        BitSet eof = new BitSet(1);
-
-        while (true) {
-            is.mark(l);
-            if (!first) {
-                tmp = prevBuffer;
-                prevBuffer = buffer;
-                buffer = tmp;
-            }
-            if (sin != null) {
-                endPos = sin.getPosition();
-            }
-
-            bufferLength = readNext(is, buffer, l, eof, posVector, sin);
-
-            if (bufferLength == -1) {
-                // End of stream
-                // looks like it is allowed to not have a closing boundary
-                //return false;
-                //if (sin != null) {
-                 //   posVector[0] = endPos;
-                //}
-                b = -1;
-                if ((s == l) && (sin == null)) {
-                    out.write(prevBuffer, 0, s);
-                }
-                return true;
-            }
-
-            if (bufferLength < l) {
-                if (sin != null) {
-                    //endPos = sin.getPosition();
-                    //posVector[0] = endPos;
-                } else {
-                    // looks like it is allowed to not have a closing boundary
-                    // in the old implementation
-                        out.write(buffer, 0, bufferLength);
-                }
-                // looks like it is allowed to not have a closing boundary
-                // in the old implementation
-                //return false;
-                b = -1;
-                return true;
-            }
-
-            for(i = lx; i >= 0; i--) {
-                if (buffer[i] != pattern[i]) {
-                    break;
-                }
-            }
-
-            if (i < 0) {
-                if (s > 0) {
-                    //looks like the earlier impl allowed just an LF
-                    // so if s == 1 : it must be an LF
-                    // if s == 2 : it must be a CR LF
-                    if (s <= 2) {
-                        //it could be "some-char\n" so write some-char
-                        if (s == 2) {
-                            if (prevBuffer[1] == '\n') {
-                                if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') {
-                                    out.write(prevBuffer,0,1);
-                                }
-                                if (sin != null) {
-                                    posVector[0] = endPos;
-                                }
-
-                            } else {
-                                throw new Exception(
-                                        "Boundary characters encountered in part Body " +
-                                        "without a preceeding CRLF");
-                            }
-
-                        } else if (s==1) {
-                            if (prevBuffer[0] != '\n') {
-                                throw new Exception(
-                                        "Boundary characters encountered in part Body " +
-                                        "without a preceeding CRLF");
-                            }else {
-                                if (sin != null) {
-                                    posVector[0] = endPos;
-                                }
-                            }
-                        }
-
-                    } else if (s > 2) {
-                        if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) {
-                            if (sin != null) {
-                                posVector[0] = endPos - 2;
-                            } else {
-                                out.write(prevBuffer, 0, s - 2);
-                            }
-                        } else if (prevBuffer[s-1] == '\n') {
-                            //old impl allowed just a \n
-                            if (sin != null) {
-                                posVector[0] = endPos - 1;
-                            } else {
-                                out.write(prevBuffer, 0, s - 1);
-                            }
-                        } else {
-                            throw new Exception(
-                                "Boundary characters encountered in part Body " +
-                                "without a preceeding CRLF");
-                        }
-                    }
-                }
-                // found the boundary, skip *LWSP-char and CRLF
-                if (!skipLWSPAndCRLF(is)) {
-                    //throw new Exception(
-                    //   "Boundary does not terminate with CRLF");
-                }
-                return true;
-            }
-
-            if ((s > 0) && (sin == null)) {
-                if (prevBuffer[s-1] == (byte)13) {
-                    // if buffer[0] == (byte)10
-                    if (buffer[0] == (byte)10) {
-                        int j;
-                        for(j = lx-1; j > 0; j--) {
-                            if (buffer[j+1] != pattern[j]) {
-                                break;
-                             }
-                         }
-                         if (j == 0) {
-                             // matched the pattern excluding the last char of the pattern
-                             // so dont write the CR into stream
-                             out.write(prevBuffer,0,s-1);
-                         } else {
-                             out.write(prevBuffer,0,s);
-                         }
-                    } else {
-                        out.write(prevBuffer, 0, s);
-                    }
-                } else {
-                    out.write(prevBuffer, 0, s);
-                }
-            }
-
-            s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
-            is.reset();
-            is.skip(s);
-            if (first) {
-                first = false;
-            }
-        }
-    }
-
-    private boolean skipLWSPAndCRLF(InputStream is) throws Exception {
-
-        b = is.read();
-        //looks like old impl allowed just a \n as well
-        if (b == '\n') {
-            return true;
-        }
-
-        if (b == '\r') {
-            b = is.read();
-            //skip any multiple '\r' "\r\n" --> "\r\r\n" on Win2k
-            if (b == '\r') {
-                b = is.read();
-            }
-            if (b == '\n') {
-                return true;
-            } else {
-                throw new Exception(
-                    "transport padding after a Mime Boundary  should end in a CRLF, found CR only");
-            }
-        }
-
-        if (b == '-') {
-            b = is.read();
-            if (b != '-') {
-               throw new Exception(
-                   "Unexpected singular '-' character after Mime Boundary");
-            } else {
-                //System.out.println("Last Part Found");
-                lastPartFound.flip(0);
-                // read the next char
-                b  = is.read();
-            }
-        }
-
-        while ((b != -1) && ((b == ' ') || (b == '\t'))) {
-            b = is.read();
-            if (b == '\n') {
-                return true;
-            }
-            if (b == '\r') {
-                b = is.read();
-                //skip any multiple '\r': "\r\n" --> "\r\r\n" on Win2k
-                if (b == '\r') {
-                    b = is.read();
-                }
-                if (b == '\n') {
-                   return true;
-                }
-            }
-        }
-
-        if (b == -1) {
-            // the last boundary need not have CRLF
-            if (!lastPartFound.get(0)) {
-                throw new Exception(
-                        "End of Multipart Stream before encountering  closing boundary delimiter");
-            }
-            return true;
-        }
-        return false;
-    }
-
-    private void compile(byte[] pattern) {
-        int l = pattern.length;
-
-        int i;
-        int j;
-
-        // Copied from J2SE 1.4 regex code
-        // java.util.regex.Pattern.java
-
-        // Initialise Bad Character Shift table
-        for (i = 0; i < l; i++) {
-            bcs[pattern[i]] = i + 1;
-        }
-
-        // Initialise Good Suffix Shift table
-        gss = new int[l];
-  NEXT: for (i = l; i > 0; i--) {
-            // j is the beginning index of suffix being considered
-            for (j = l - 1; j >= i; j--) {
-                // Testing for good suffix
-                if (pattern[j] == pattern[j - i]) {
-                    // pattern[j..len] is a good suffix
-                    gss[j - 1] = i;
-                } else {
-                   // No match. The array has already been
-                   // filled up with correct values before.
-                   continue NEXT;
-                }
-            }
-            while (j > 0) {
-                gss[--j] = i;
-            }
-        }
-        gss[l - 1] = 1;
-    }
-
-
-    /**
-     * Iterates through all the parts and outputs each Mime part
-     * separated by a boundary.
-     */
-
-    public void writeTo(OutputStream os)
-            throws IOException, MessagingException {
-
-        // inputStream was not null
-        if (in != null) {
-            contentType.setParameter("boundary", this.boundary);
-        }
-
-        String bnd = "--" + contentType.getParameter("boundary");
-        for (int i = 0; i < parts.size(); i++) {
-            OutputUtil.writeln(bnd, os); // put out boundary
-            ((MimeBodyPart)parts.get(i)).writeTo(os);
-            OutputUtil.writeln(os); // put out empty line
-        }
-
-        if (in != null) {
-            OutputUtil.writeln(bnd, os); // put out boundary
-            if ((os instanceof ByteOutputStream) && lazyAttachments) {
-                ((ByteOutputStream) os).write(in);
-            } else {
-                ByteOutputStream baos = null;
-                try {
-                    baos = new ByteOutputStream(in.available());
-                    baos.write(in);
-                    baos.writeTo(os);
-                    // reset the inputstream so that we can support a
-                    // getAttachment later
-                    in = baos.newInputStream();
-                } finally {
-                    if (baos != null)
-                        baos.close();
-                }
-            }
-
-            // this will endup writing the end boundary
-        } else {
-            // put out last boundary
-            OutputUtil.writeAsAscii(bnd, os);
-            OutputUtil.writeAsAscii("--", os);
-        }
-    }
-
-    public void setInputStream(InputStream is) {
-        this.in = is;
-    }
-
-    public InputStream getInputStream() {
-        return this.in;
-    }
-
-    public void setBoundary(String bnd) {
-        this.boundary = bnd;
-        if (this.contentType != null) {
-            this.contentType.setParameter("boundary", bnd);
-        }
-    }
-    public String getBoundary() {
-        return this.boundary;
-    }
-
-    public boolean isEndOfStream() {
-        return (b == -1);
-    }
-
-    public void setLazyAttachments(boolean flag) {
-        lazyAttachments = flag;
-    }
-
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentDisposition.java        1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentDisposition value. It provides
- * methods to parse a ContentDisposition string into individual components
- * and to generate a MIME style ContentDisposition string.
- *
- * @version 1.6, 02/03/27
- * @author  John Mani
- */
-
-public class ContentDisposition {
-
-    private String disposition; // disposition
-    private ParameterList list; // parameter list
-
-    /**
-     * No-arg Constructor.
-     */
-    public ContentDisposition() { }
-
-    /**
-     * Constructor.
-     *
-     * @param   disposition     disposition
-     * @param   list    ParameterList
-     * @since           JavaMail 1.2
-     */
-    public ContentDisposition(String disposition, ParameterList list) {
-        this.disposition = disposition;
-        this.list = list;
-    }
-
-    /**
-     * Constructor that takes a ContentDisposition string. The String
-     * is parsed into its constituents: dispostion and parameters.
-     * A ParseException is thrown if the parse fails.
-     *
-     * @param   s       the ContentDisposition string.
-     * @exception       ParseException if the parse fails.
-     * @since           JavaMail 1.2
-     */
-    public ContentDisposition(String s) throws ParseException {
-        HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-        HeaderTokenizer.Token tk;
-
-        // First "disposition" ..
-        tk = h.next();
-        if (tk.getType() != HeaderTokenizer.Token.ATOM)
-            throw new ParseException();
-        disposition = tk.getValue();
-
-        // Then parameters ..
-        String rem = h.getRemainder();
-        if (rem != null)
-            list = new ParameterList(rem);
-    }
-
-    /**
-     * Return the disposition value.
-     * @return the disposition
-     * @since           JavaMail 1.2
-     */
-    public String getDisposition() {
-        return disposition;
-    }
-
-    /**
-     * Return the specified parameter value. Returns <code>null</code>
-     * if this parameter is absent.
-     * @return  parameter value
-     * @since           JavaMail 1.2
-     */
-    public String getParameter(String name) {
-        if (list == null)
-            return null;
-
-        return list.get(name);
-    }
-
-    /**
-     * Return a ParameterList object that holds all the available
-     * parameters. Returns null if no parameters are available.
-     *
-     * @return  ParameterList
-     * @since           JavaMail 1.2
-     */
-    public ParameterList getParameterList() {
-        return list;
-    }
-
-    /**
-     * Set the primary type. Overrides existing primary type.
-     * @param   primaryType     primary type
-     * @since           JavaMail 1.2
-     */
-    public void setDisposition(String disposition) {
-        this.disposition = disposition;
-    }
-
-    /**
-     * Set the specified parameter. If this parameter already exists,
-     * it is replaced by this new value.
-     *
-     * @param   name    parameter name
-     * @param   value   parameter value
-     * @since           JavaMail 1.2
-     */
-    public void setParameter(String name, String value) {
-        if (list == null)
-            list = new ParameterList();
-
-        list.set(name, value);
-    }
-
-    /**
-     * Set a new ParameterList.
-     * @param   list    ParameterList
-     * @since           JavaMail 1.2
-     */
-    public void setParameterList(ParameterList list) {
-        this.list = list;
-    }
-
-    /**
-     * Retrieve a RFC2045 style string representation of
-     * this ContentDisposition. Returns <code>null</code> if
-     * the conversion failed.
-     *
-     * @return  RFC2045 style string
-     * @since           JavaMail 1.2
-     */
-    public String toString() {
-        if (disposition == null)
-            return null;
-
-        if (list == null)
-            return disposition;
-
-        StringBuffer sb = new StringBuffer(disposition);
-
-        // append the parameter list
-        // use the length of the string buffer + the length of
-        // the header name formatted as follows "Content-Disposition: "
-        sb.append(list.toString(sb.length() + 21));
-        return sb.toString();
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentType.java       1.7 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentType value. It provides
- * methods to parse a ContentType string into individual components
- * and to generate a MIME style ContentType string.
- *
- * @version 1.7, 02/03/27
- * @author  John Mani
- */
-public final class ContentType {
-
-    private String primaryType; // primary type
-    private String subType;     // subtype
-    private ParameterList list; // parameter list
-
-    /**
-     * No-arg Constructor.
-     */
-    public ContentType() { }
-
-    /**
-     * Constructor.
-     *
-     * @param   primaryType     primary type
-     * @param   subType subType
-     * @param   list    ParameterList
-     */
-    public ContentType(String primaryType, String subType,
-                       ParameterList list) {
-        this.primaryType = primaryType;
-        this.subType = subType;
-        if (list == null)
-            list = new ParameterList();
-        this.list = list;
-    }
-
-    /**
-     * Constructor that takes a Content-Type string. The String
-     * is parsed into its constituents: primaryType, subType
-     * and parameters. A ParseException is thrown if the parse fails.
-     *
-     * @param   s       the Content-Type string.
-     * @exception       ParseException if the parse fails.
-     */
-    public ContentType(String s) throws ParseException {
-        HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-        HeaderTokenizer.Token tk;
-
-        // First "type" ..
-        tk = h.next();
-        if (tk.getType() != HeaderTokenizer.Token.ATOM)
-            throw new ParseException();
-        primaryType = tk.getValue();
-
-        // The '/' separator ..
-        tk = h.next();
-        if ((char)tk.getType() != '/')
-            throw new ParseException();
-
-        // Then "subType" ..
-        tk = h.next();
-        if (tk.getType() != HeaderTokenizer.Token.ATOM)
-            throw new ParseException();
-        subType = tk.getValue();
-
-        // Finally parameters ..
-        String rem = h.getRemainder();
-        if (rem != null)
-            list = new ParameterList(rem);
-    }
-
-    public ContentType copy() {
-        return new ContentType(primaryType,subType,list.copy());
-    }
-
-    /**
-     * Return the primary type.
-     * @return the primary type
-     */
-    public String getPrimaryType() {
-        return primaryType;
-    }
-
-    /**
-     * Return the subType.
-     * @return the subType
-     */
-    public String getSubType() {
-        return subType;
-    }
-
-    /**
-     * Return the MIME type string, without the parameters.
-     * The returned value is basically the concatenation of
-     * the primaryType, the '/' character and the secondaryType.
-     *
-     * @return the type
-     */
-    public String getBaseType() {
-        return primaryType + '/' + subType;
-    }
-
-    /**
-     * Return the specified parameter value. Returns <code>null</code>
-     * if this parameter is absent.
-     * @return  parameter value
-     */
-    public String getParameter(String name) {
-        if (list == null)
-            return null;
-
-        return list.get(name);
-    }
-
-    /**
-     * Return a ParameterList object that holds all the available
-     * parameters. Returns null if no parameters are available.
-     *
-     * @return  ParameterList
-     */
-    public ParameterList getParameterList() {
-        return list;
-    }
-
-    /**
-     * Set the primary type. Overrides existing primary type.
-     * @param   primaryType     primary type
-     */
-    public void setPrimaryType(String primaryType) {
-        this.primaryType = primaryType;
-    }
-
-    /**
-     * Set the subType. Overrides existing subType
-     * @param   subType subType
-     */
-    public void setSubType(String subType) {
-        this.subType = subType;
-    }
-
-    /**
-     * Set the specified parameter. If this parameter already exists,
-     * it is replaced by this new value.
-     *
-     * @param   name    parameter name
-     * @param   value   parameter value
-     */
-    public void setParameter(String name, String value) {
-        if (list == null)
-            list = new ParameterList();
-
-        list.set(name, value);
-    }
-
-    /**
-     * Set a new ParameterList.
-     * @param   list    ParameterList
-     */
-    public void setParameterList(ParameterList list) {
-        this.list = list;
-    }
-
-    /**
-     * Retrieve a RFC2045 style string representation of
-     * this Content-Type. Returns <code>null</code> if
-     * the conversion failed.
-     *
-     * @return  RFC2045 style string
-     */
-    public String toString() {
-        if (primaryType == null || subType == null) // need both
-            return null;
-
-        StringBuffer sb = new StringBuffer();
-        sb.append(primaryType).append('/').append(subType);
-        if (list != null)
-        // Http Binding section of the "SOAP with attachments" specification says,
-        // "SOAP message senders should send Content-Type headers on a single long line."
-        // (http://www.w3.org/TR/SOAP-attachments#HTTPBinding)
-            sb.append(list.toString());
-
-        return sb.toString();
-    }
-
-    /**
-     * Match with the specified ContentType object. This method
-     * compares <strong>only the <code>primaryType</code> and
-     * <code>subType</code> </strong>. The parameters of both operands
-     * are ignored. <p>
-     *
-     * For example, this method will return <code>true</code> when
-     * comparing the ContentTypes for <strong>"text/plain"</strong>
-     * and <strong>"text/plain; charset=foobar"</strong>.
-     *
-     * If the <code>subType</code> of either operand is the special
-     * character '*', then the subtype is ignored during the match.
-     * For example, this method will return <code>true</code> when
-     * comparing the ContentTypes for <strong>"text/plain"</strong>
-     * and <strong>"text/*" </strong>
-     *
-     * @param   cType to compare this against
-     */
-    public boolean match(ContentType cType) {
-        // Match primaryType
-        if (!primaryType.equalsIgnoreCase(cType.getPrimaryType()))
-            return false;
-
-        String sType = cType.getSubType();
-
-        // If either one of the subTypes is wildcarded, return true
-        if ((subType.charAt(0) == '*') || (sType.charAt(0) == '*'))
-            return true;
-
-        // Match subType
-        if (!subType.equalsIgnoreCase(sType))
-            return false;
-
-        return true;
-    }
-
-    /**
-     * Match with the specified content-type string. This method
-     * compares <strong>only the <code>primaryType</code> and
-     * <code>subType</code> </strong>.
-     * The parameters of both operands are ignored. <p>
-     *
-     * For example, this method will return <code>true</code> when
-     * comparing the ContentType for <strong>"text/plain"</strong>
-     * with <strong>"text/plain; charset=foobar"</strong>.
-     *
-     * If the <code>subType</code> of either operand is the special
-     * character '*', then the subtype is ignored during the match.
-     * For example, this method will return <code>true</code> when
-     * comparing the ContentType for <strong>"text/plain"</strong>
-     * with <strong>"text/*" </strong>
-     */
-    public boolean match(String s) {
-        try {
-            return match(new ContentType(s));
-        } catch (ParseException pex) {
-            return false;
-        }
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)HeaderTokenizer.java   1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class tokenizes RFC822 and MIME headers into the basic
- * symbols specified by RFC822 and MIME. <p>
- *
- * This class handles folded headers (ie headers with embedded
- * CRLF SPACE sequences). The folds are removed in the returned
- * tokens.
- *
- * @version 1.9, 02/03/27
- * @author  John Mani
- */
-
-public class HeaderTokenizer {
-
-    /**
-     * The Token class represents tokens returned by the
-     * HeaderTokenizer.
-     */
-    public static class Token {
-
-        private int type;
-        private String value;
-
-        /**
-         * Token type indicating an ATOM.
-         */
-        public static final int ATOM            = -1;
-
-        /**
-         * Token type indicating a quoted string. The value
-         * field contains the string without the quotes.
-         */
-        public static final int QUOTEDSTRING    = -2;
-
-        /**
-         * Token type indicating a comment. The value field
-         * contains the comment string without the comment
-         * start and end symbols.
-         */
-        public static final int COMMENT         = -3;
-
-        /**
-         * Token type indicating end of input.
-         */
-        public static final int  EOF            = -4;
-
-        /**
-         * Constructor.
-         * @param       type    Token type
-         * @param       value   Token value
-         */
-        public Token(int type, String value) {
-             this.type = type;
-             this.value = value;
-        }
-
-        /**
-         * Return the type of the token. If the token represents a
-         * delimiter or a control character, the type is that character
-         * itself, converted to an integer. Otherwise, it's value is
-         * one of the following:
-         * <ul>
-         * <li><code>ATOM</code> A sequence of ASCII characters
-         *      delimited by either SPACE, CTL, "(", <"> or the
-         *      specified SPECIALS
-         * <li><code>QUOTEDSTRING</code> A sequence of ASCII characters
-         *      within quotes
-         * <li><code>COMMENT</code> A sequence of ASCII characters
-         *      within "(" and ")".
-         * <li><code>EOF</code> End of header
-         * </ul>
-         */
-        public int getType() {
-            return type;
-        }
-
-        /**
-         * Returns the value of the token just read. When the current
-         * token is a quoted string, this field contains the body of the
-         * string, without the quotes. When the current token is a comment,
-         * this field contains the body of the comment.
-         *
-         * @return      token value
-         */
-        public String getValue() {
-            return value;
-        }
-    }
-
-    private String string; // the string to be tokenized
-    private boolean skipComments; // should comments be skipped ?
-    private String delimiters; // delimiter string
-    private int currentPos; // current parse position
-    private int maxPos; // string length
-    private int nextPos; // track start of next Token for next()
-    private int peekPos; // track start of next Token for peek()
-
-    /**
-     * RFC822 specials
-     */
-    public final static String RFC822 = "()<>@,;:\\\"\t .[]";
-
-    /**
-     * MIME specials
-     */
-    public final static String MIME = "()<>@,;:\\\"\t []/?=";
-
-    // The EOF Token
-    private final static Token EOFToken = new Token(Token.EOF, null);
-
-    /**
-     * Constructor that takes a rfc822 style header.
-     *
-     * @param   header  The rfc822 header to be tokenized
-     * @param   delimiters      Set of delimiter characters
-     *                          to be used to delimit ATOMS. These
-     *                          are usually <code>RFC822</code> or
-     *                          <code>MIME</code>
-     * @param   skipComments  If true, comments are skipped and
-     *                          not returned as tokens
-     */
-    public HeaderTokenizer(String header, String delimiters,
-                           boolean skipComments) {
-        string = (header == null) ? "" : header; // paranoia ?!
-        this.skipComments = skipComments;
-        this.delimiters = delimiters;
-        currentPos = nextPos = peekPos = 0;
-        maxPos = string.length();
-    }
-
-    /**
-     * Constructor. Comments are ignored and not returned as tokens
-     *
-     * @param   header  The header that is tokenized
-     * @param   delimiters  The delimiters to be used
-     */
-    public HeaderTokenizer(String header, String delimiters) {
-        this(header, delimiters, true);
-    }
-
-    /**
-     * Constructor. The RFC822 defined delimiters - RFC822 - are
-     * used to delimit ATOMS. Also comments are skipped and not
-     * returned as tokens
-     */
-    public HeaderTokenizer(String header)  {
-        this(header, RFC822);
-    }
-
-    /**
-     * Parses the next token from this String. <p>
-     *
-     * Clients sit in a loop calling next() to parse successive
-     * tokens until an EOF Token is returned.
-     *
-     * @return          the next Token
-     * @exception       ParseException if the parse fails
-     */
-    public Token next() throws ParseException {
-        Token tk;
-
-        currentPos = nextPos; // setup currentPos
-        tk = getNext();
-        nextPos = peekPos = currentPos; // update currentPos and peekPos
-        return tk;
-    }
-
-    /**
-     * Peek at the next token, without actually removing the token
-     * from the parse stream. Invoking this method multiple times
-     * will return successive tokens, until <code>next()</code> is
-     * called. <p>
-     *
-     * @return          the next Token
-     * @exception       ParseException if the parse fails
-     */
-    public Token peek() throws ParseException {
-        Token tk;
-
-        currentPos = peekPos; // setup currentPos
-        tk = getNext();
-        peekPos = currentPos; // update peekPos
-        return tk;
-    }
-
-    /**
-     * Return the rest of the Header.
-     *
-     * @return String   rest of header. null is returned if we are
-     *                  already at end of header
-     */
-    public String getRemainder() {
-        return string.substring(nextPos);
-    }
-
-    /*
-     * Return the next token starting from 'currentPos'. After the
-     * parse, 'currentPos' is updated to point to the start of the
-     * next token.
-     */
-    private Token getNext() throws ParseException {
-        // If we're already at end of string, return EOF
-        if (currentPos >= maxPos)
-            return EOFToken;
-
-        // Skip white-space, position currentPos beyond the space
-        if (skipWhiteSpace() == Token.EOF)
-            return EOFToken;
-
-        char c;
-        int start;
-        boolean filter = false;
-
-        c = string.charAt(currentPos);
-
-        // Check or Skip comments and position currentPos
-        // beyond the comment
-        while (c == '(') {
-            // Parsing comment ..
-            int nesting;
-            for (start = ++currentPos, nesting = 1;
-                 nesting > 0 && currentPos < maxPos;
-                 currentPos++) {
-                c = string.charAt(currentPos);
-                if (c == '\\') {  // Escape sequence
-                    currentPos++; // skip the escaped character
-                    filter = true;
-                } else if (c == '\r')
-                    filter = true;
-                else if (c == '(')
-                    nesting++;
-                else if (c == ')')
-                    nesting--;
-            }
-            if (nesting != 0)
-                throw new ParseException("Unbalanced comments");
-
-            if (!skipComments) {
-                // Return the comment, if we are asked to.
-                // Note that the comment start & end markers are ignored.
-                String s;
-                if (filter) // need to go thru the token again.
-                    s = filterToken(string, start, currentPos-1);
-                else
-                    s = string.substring(start,currentPos-1);
-
-                return new Token(Token.COMMENT, s);
-            }
-
-            // Skip any whitespace after the comment.
-            if (skipWhiteSpace() == Token.EOF)
-                return EOFToken;
-            c = string.charAt(currentPos);
-        }
-
-        // Check for quoted-string and position currentPos
-        //  beyond the terminating quote
-        if (c == '"') {
-            for (start = ++currentPos; currentPos < maxPos; currentPos++) {
-                c = string.charAt(currentPos);
-                if (c == '\\') { // Escape sequence
-                    currentPos++;
-                    filter = true;
-                } else if (c == '\r')
-                    filter = true;
-                else if (c == '"') {
-                    currentPos++;
-                    String s;
-
-                    if (filter)
-                        s = filterToken(string, start, currentPos-1);
-                    else
-                        s = string.substring(start,currentPos-1);
-
-                    return new Token(Token.QUOTEDSTRING, s);
-                }
-            }
-            throw new ParseException("Unbalanced quoted string");
-        }
-
-        // Check for SPECIAL or CTL
-        if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
-            currentPos++; // re-position currentPos
-            char ch[] = new char[1];
-            ch[0] = c;
-            return new Token((int)c, new String(ch));
-        }
-
-        // Check for ATOM
-        for (start = currentPos; currentPos < maxPos; currentPos++) {
-            c = string.charAt(currentPos);
-            // ATOM is delimited by either SPACE, CTL, "(", <">
-            // or the specified SPECIALS
-            if (c < 040 || c >= 0177 || c == '(' || c == ' ' ||
-                c == '"' || delimiters.indexOf(c) >= 0)
-                break;
-        }
-        return new Token(Token.ATOM, string.substring(start, currentPos));
-    }
-
-    // Skip SPACE, HT, CR and NL
-    private int skipWhiteSpace() {
-        char c;
-        for (; currentPos < maxPos; currentPos++)
-            if (((c = string.charAt(currentPos)) != ' ') &&
-                (c != '\t') && (c != '\r') && (c != '\n'))
-                return currentPos;
-        return Token.EOF;
-    }
-
-    /* Process escape sequences and embedded LWSPs from a comment or
-     * quoted string.
-     */
-    private static String filterToken(String s, int start, int end) {
-        StringBuffer sb = new StringBuffer();
-        char c;
-        boolean gotEscape = false;
-        boolean gotCR = false;
-
-        for (int i = start; i < end; i++) {
-            c = s.charAt(i);
-            if (c == '\n' && gotCR) {
-                // This LF is part of an unescaped
-                // CRLF sequence (i.e, LWSP). Skip it.
-                gotCR = false;
-                continue;
-            }
-
-            gotCR = false;
-            if (!gotEscape) {
-                // Previous character was NOT '\'
-                if (c == '\\') // skip this character
-                    gotEscape = true;
-                else if (c == '\r') // skip this character
-                    gotCR = true;
-                else // append this character
-                    sb.append(c);
-            } else {
-                // Previous character was '\'. So no need to
-                // bother with any special processing, just
-                // append this character
-                sb.append(c);
-                gotEscape = false;
-            }
-        }
-        return sb.toString();
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,402 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)InternetHeaders.java   1.16 02/08/08
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.AbstractList;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * InternetHeaders is a utility class that manages RFC822 style
- * headers. Given an RFC822 format message stream, it reads lines
- * until the blank line that indicates end of header. The input stream
- * is positioned at the start of the body. The lines are stored
- * within the object and can be extracted as either Strings or
- * {@link Header} objects. <p>
- * <p/>
- * This class is mostly intended for service providers. MimeMessage
- * and MimeBody use this class for holding their headers. <p>
- * <p/>
- * <hr> <strong>A note on RFC822 and MIME headers</strong><p>
- * <p/>
- * RFC822 and MIME header fields <strong>must</strong> contain only
- * US-ASCII characters. If a header contains non US-ASCII characters,
- * it must be encoded as per the rules in RFC 2047. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the <code>setHeader</code>, <code>addHeader</code>, and
- * <code>addHeaderLine</code> methods are responsible for enforcing
- * the MIME requirements for the specified headers.  In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP).  Received headers may have been folded.  The application is
- * responsible for folding and unfolding headers as appropriate. <p>
- *
- * @author John Mani
- * @author Bill Shannon
- * @see MimeUtility
- */
-public final class InternetHeaders {
-
-    private final FinalArrayList headers = new FinalArrayList();
-
-    /**
-     * Lazily cerated view of header lines (Strings).
-     */
-    private List headerValueView;
-
-    /**
-     * Create an empty InternetHeaders object.
-     */
-    public InternetHeaders() {
-    }
-
-    /**
-     * Read and parse the given RFC822 message stream till the
-     * blank line separating the header from the body. The input
-     * stream is left positioned at the start of the body. The
-     * header lines are stored internally. <p>
-     * <p/>
-     * For efficiency, wrap a BufferedInputStream around the actual
-     * input stream and pass it as the parameter.
-     *
-     * @param   is RFC822 input stream
-     */
-    public InternetHeaders(InputStream is) throws MessagingException {
-        load(is);
-    }
-
-    /**
-     * Read and parse the given RFC822 message stream till the
-     * blank line separating the header from the body. Store the
-     * header lines inside this InternetHeaders object. <p>
-     * <p/>
-     * Note that the header lines are added into this InternetHeaders
-     * object, so any existing headers in this object will not be
-     * affected.
-     *
-     * @param   is RFC822 input stream
-     */
-    public void load(InputStream is) throws MessagingException {
-        // Read header lines until a blank line. It is valid
-        // to have BodyParts with no header lines.
-        String line;
-        LineInputStream lis = new LineInputStream(is);
-        String prevline = null; // the previous header line, as a string
-        // a buffer to accumulate the header in, when we know it's needed
-        StringBuffer lineBuffer = new StringBuffer();
-
-        try {
-            //while ((line = lis.readLine()) != null) {
-            do {
-                line = lis.readLine();
-                if (line != null &&
-                        (line.startsWith(" ") || line.startsWith("\t"))) {
-                    // continuation of header
-                    if (prevline != null) {
-                        lineBuffer.append(prevline);
-                        prevline = null;
-                    }
-                    lineBuffer.append("\r\n");
-                    lineBuffer.append(line);
-                } else {
-                    // new header
-                    if (prevline != null)
-                        addHeaderLine(prevline);
-                    else if (lineBuffer.length() > 0) {
-                        // store previous header first
-                        addHeaderLine(lineBuffer.toString());
-                        lineBuffer.setLength(0);
-                    }
-                    prevline = line;
-                }
-            } while (line != null && line.length() > 0);
-        } catch (IOException ioex) {
-            throw new MessagingException("Error in input stream", ioex);
-        }
-    }
-
-    /**
-     * Return all the values for the specified header. The
-     * values are String objects.  Returns <code>null</code>
-     * if no headers with the specified name exist.
-     *
-     * @param   name header name
-     * @return          array of header values, or null if none
-     */
-    public String[] getHeader(String name) {
-        // XXX - should we just step through in index order?
-        FinalArrayList v = new FinalArrayList(); // accumulate return values
-
-        int len = headers.size();
-        for( int i=0; i<len; i++ ) {
-            hdr h = (hdr) headers.get(i);
-            if (name.equalsIgnoreCase(h.name)) {
-                v.add(h.getValue());
-            }
-        }
-        if (v.size() == 0)
-            return (null);
-        // convert Vector to an array for return
-        return (String[]) v.toArray(new String[v.size()]);
-    }
-
-    /**
-     * Get all the headers for this header name, returned as a single
-     * String, with headers separated by the delimiter. If the
-     * delimiter is <code>null</code>, only the first header is
-     * returned.  Returns <code>null</code>
-     * if no headers with the specified name exist.
-     *
-     * @param delimiter delimiter
-     * @return the value fields for all headers with
-     *         this name, or null if none
-     * @param   name header name
-     */
-    public String getHeader(String name, String delimiter) {
-        String[] s = getHeader(name);
-
-        if (s == null)
-            return null;
-
-        if ((s.length == 1) || delimiter == null)
-            return s[0];
-
-        StringBuffer r = new StringBuffer(s[0]);
-        for (int i = 1; i < s.length; i++) {
-            r.append(delimiter);
-            r.append(s[i]);
-        }
-        return r.toString();
-    }
-
-    /**
-     * Change the first header line that matches name
-     * to have value, adding a new header if no existing header
-     * matches. Remove all matching headers but the first. <p>
-     * <p/>
-     * Note that RFC822 headers can only contain US-ASCII characters
-     *
-     * @param   name    header name
-     * @param   value   header value
-     */
-    public void setHeader(String name, String value) {
-        boolean found = false;
-
-        for (int i = 0; i < headers.size(); i++) {
-            hdr h = (hdr) headers.get(i);
-            if (name.equalsIgnoreCase(h.name)) {
-                if (!found) {
-                    int j;
-                    if (h.line != null && (j = h.line.indexOf(':')) >= 0) {
-                        h.line = h.line.substring(0, j + 1) + " " + value;
-                    } else {
-                        h.line = name + ": " + value;
-                    }
-                    found = true;
-                } else {
-                    headers.remove(i);
-                    i--;    // have to look at i again
-                }
-            }
-        }
-
-        if (!found) {
-            addHeader(name, value);
-        }
-    }
-
-    /**
-     * Add a header with the specified name and value to the header list. <p>
-     * <p/>
-     * Note that RFC822 headers can only contain US-ASCII characters.
-     *
-     * @param   name    header name
-     * @param   value   header value
-     */
-    public void addHeader(String name, String value) {
-        int pos = headers.size();
-        for (int i = headers.size() - 1; i >= 0; i--) {
-            hdr h = (hdr) headers.get(i);
-            if (name.equalsIgnoreCase(h.name)) {
-                headers.add(i + 1, new hdr(name, value));
-                return;
-            }
-            // marker for default place to add new headers
-            if (h.name.equals(":"))
-                pos = i;
-        }
-        headers.add(pos, new hdr(name, value));
-    }
-
-    /**
-     * Remove all header entries that match the given name
-     *
-     * @param   name header name
-     */
-    public void removeHeader(String name) {
-        for (int i = 0; i < headers.size(); i++) {
-            hdr h = (hdr) headers.get(i);
-            if (name.equalsIgnoreCase(h.name)) {
-                headers.remove(i);
-                i--;    // have to look at i again
-            }
-        }
-    }
-
-    /**
-     * Return all the headers as an Enumeration of
-     * {@link Header} objects.
-     *
-     * @return  Header objects
-     */
-    public FinalArrayList getAllHeaders() {
-        return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
-    }
-
-    /**
-     * Add an RFC822 header line to the header store.
-     * If the line starts with a space or tab (a continuation line),
-     * add it to the last header line in the list. <p>
-     * <p/>
-     * Note that RFC822 headers can only contain US-ASCII characters
-     *
-     * @param   line    raw RFC822 header line
-     */
-    public void addHeaderLine(String line) {
-        try {
-            char c = line.charAt(0);
-            if (c == ' ' || c == '\t') {
-                hdr h = (hdr) headers.get(headers.size() - 1);
-                h.line += "\r\n" + line;
-            } else
-                headers.add(new hdr(line));
-        } catch (StringIndexOutOfBoundsException e) {
-            // line is empty, ignore it
-            return;
-        } catch (NoSuchElementException e) {
-            // XXX - vector is empty?
-        }
-    }
-
-    /**
-     * Return all the header lines as a collection
-     */
-    public List getAllHeaderLines() {
-        if(headerValueView==null)
-            headerValueView = new AbstractList() {
-                public Object get(int index) {
-                    return ((hdr)headers.get(index)).line;
-                }
-
-                public int size() {
-                    return headers.size();
-                }
-            };
-        return headerValueView;
-    }
-}
-
-/*
- * A private utility class to represent an individual header.
- */
-
-class hdr implements Header {
-    // XXX - should these be private?
-    String name;    // the canonicalized (trimmed) name of this header
-    // XXX - should name be stored in lower case?
-    String line;    // the entire RFC822 header "line"
-
-    /*
-     * Constructor that takes a line and splits out
-     * the header name.
-     */
-    hdr(String l) {
-        int i = l.indexOf(':');
-        if (i < 0) {
-            // should never happen
-            name = l.trim();
-        } else {
-            name = l.substring(0, i).trim();
-        }
-        line = l;
-    }
-
-    /*
-     * Constructor that takes a header name and value.
-     */
-    hdr(String n, String v) {
-        name = n;
-        line = n + ": " + v;
-    }
-
-    /*
-     * Return the "name" part of the header line.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /*
-     * Return the "value" part of the header line.
-     */
-    public String getValue() {
-        int i = line.indexOf(':');
-        if (i < 0)
-            return line;
-
-        int j;
-        if (name.equalsIgnoreCase("Content-Description")) {
-            // Content-Description should retain the folded whitespace after header unfolding -
-            // rf. RFC2822 section 2.2.3, rf. RFC2822 section 3.2.3
-            for (j = i + 1; j < line.length(); j++) {
-                char c = line.charAt(j);
-                if (!(/*c == ' ' ||*/c == '\t' || c == '\r' || c == '\n'))
-                    break;
-            }
-        } else {
-            // skip whitespace after ':'
-            for (j = i + 1; j < line.length(); j++) {
-                char c = line.charAt(j);
-                if (!(c == ' ' || c == '\t' || c == '\r' || c == '\n'))
-                    break;
-            }
-        }
-        return line.substring(j);
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1165 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeBodyPart.java      1.52 03/02/12
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.activation.DataHandler;
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.List;
-import javax.activation.DataSource;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- * This class represents a MIME body part.
- * MimeBodyParts are contained in <code>MimeMultipart</code>
- * objects. <p>
- *
- * MimeBodyPart uses the <code>InternetHeaders</code> class to parse
- * and store the headers of that body part. <p>
- *
- * <hr><strong>A note on RFC 822 and MIME headers</strong><p>
- *
- * RFC 822 header fields <strong>must</strong> contain only
- * US-ASCII characters. MIME allows non ASCII characters to be present
- * in certain portions of certain headers, by encoding those characters.
- * RFC 2047 specifies the rules for doing this. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the <code>setHeader</code>, <code>addHeader</code>, and
- * <code>addHeaderLine</code> methods are responsible for enforcing
- * the MIME requirements for the specified headers.  In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP).  Received headers may have been folded.  The application is
- * responsible for folding and unfolding headers as appropriate. <p>
- *
- * @author John Mani
- * @author Bill Shannon
- * @see MimeUtility
- */
-
-public final class MimeBodyPart {
-
-    /**
-     * This part should be presented as an attachment.
-     * @see #getDisposition
-     * @see #setDisposition
-     */
-    public static final String ATTACHMENT = "attachment";
-
-    /**
-     * This part should be presented inline.
-     * @see #getDisposition
-     * @see #setDisposition
-     */
-    public static final String INLINE = "inline";
-
-
-    // Paranoia:
-    // allow this last minute change to be disabled if it causes problems
-    private static boolean setDefaultTextCharset = true;
-
-    static {
-        try {
-            String s = System.getProperty("mail.mime.setdefaulttextcharset");
-            // default to true
-            setDefaultTextCharset = s == null || !s.equalsIgnoreCase("false");
-        } catch (SecurityException sex) {
-            // ignore it
-        }
-    }
-
-    /*
-        Data is represented in one of three forms.
-        Either we have a DataHandler, or byte[] as the raw content image, or the contentStream.
-        It's OK to have more than one of them, provided that they are identical.
-    */
-
-    /**
-     * The DataHandler object representing this MimeBodyPart's content.
-     */
-    private DataHandler dh;
-
-    /**
-     * Byte array that holds the bytes of the content of this MimeBodyPart.
-     * Used in a pair with {@link #contentLength} to denote a regision of a buffer
-     * as a valid data.
-     */
-    private byte[] content;
-    private int contentLength;
-    private int start = 0;
-
-    /**
-     * If the data for this body part was supplied by an
-     * InputStream that implements the SharedInputStream interface,
-     * <code>contentStream</code> is another such stream representing
-     * the content of this body part.  In this case, <code>content</code>
-     * will be null.
-     *
-     * @since   JavaMail 1.2
-     */
-    private InputStream contentStream;
-
-
-
-    /**
-     * The InternetHeaders object that stores all the headers
-     * of this body part.
-     */
-    private final InternetHeaders headers;
-
-    /**
-     * The <code>MimeMultipart</code> object containing this <code>MimeBodyPart</code>,
-     * if known.
-     * @since   JavaMail 1.1
-     */
-    private MimeMultipart parent;
-
-    private MIMEPart mimePart;
-
-    /**
-     * An empty MimeBodyPart object is created.
-     * This body part maybe filled in by a client constructing a multipart
-     * message.
-     */
-    public MimeBodyPart() {
-        headers = new InternetHeaders();
-    }
-
-    /**
-     * Constructs a MimeBodyPart by reading and parsing the data from
-     * the specified input stream. The parser consumes data till the end
-     * of the given input stream.  The input stream must start at the
-     * beginning of a valid MIME body part and must terminate at the end
-     * of that body part. <p>
-     *
-     * Note that the "boundary" string that delimits body parts must
-     * <strong>not</strong> be included in the input stream. The intention
-     * is that the MimeMultipart parser will extract each body part's bytes
-     * from a multipart stream and feed them into this constructor, without
-     * the delimiter strings.
-     *
-     * @param   is      the body part Input Stream
-     */
-    public MimeBodyPart(InputStream is) throws MessagingException {
-        if (!(is instanceof ByteArrayInputStream) &&
-                !(is instanceof BufferedInputStream) &&
-                !(is instanceof SharedInputStream))
-            is = new BufferedInputStream(is);
-
-        headers = new InternetHeaders(is);
-
-        if (is instanceof SharedInputStream) {
-            SharedInputStream sis = (SharedInputStream) is;
-            contentStream = sis.newStream(sis.getPosition(), -1);
-        } else {
-            ByteOutputStream bos = null;
-            try {
-                bos = new ByteOutputStream();
-                bos.write(is);
-                content = bos.getBytes();
-                contentLength = bos.getCount();
-            } catch (IOException ioex) {
-                throw new MessagingException("Error reading input stream", ioex);
-            } finally {
-                if (bos != null)
-                    bos.close();
-            }
-        }
-
-    }
-
-    /**
-     * Constructs a MimeBodyPart using the given header and
-     * content bytes. <p>
-     *
-     * Used by providers.
-     *
-     * @param   headers The header of this part
-     * @param   content bytes representing the body of this part.
-     */
-    public MimeBodyPart(InternetHeaders headers, byte[] content, int len) {
-        this.headers = headers;
-        this.content = content;
-        this.contentLength = len;
-    }
-
-    public MimeBodyPart(
-        InternetHeaders headers, byte[] content, int start,  int len) {
-        this.headers = headers;
-        this.content = content;
-        this.start = start;
-        this.contentLength = len;
-    }
-
-    public MimeBodyPart(MIMEPart part) {
-       mimePart = part;
-       headers = new InternetHeaders();
-       List<? extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = mimePart.getAllHeaders();
-        for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
-            headers.addHeader(hd.getName(), hd.getValue());
-        }
-    }
-    /**
-     * Return the containing <code>MimeMultipart</code> object,
-     * or <code>null</code> if not known.
-     */
-    public MimeMultipart getParent() {
-        return parent;
-    }
-
-    /**
-     * Set the parent of this <code>MimeBodyPart</code> to be the specified
-     * <code>MimeMultipart</code>.  Normally called by <code>MimeMultipart</code>'s
-     * <code>addBodyPart</code> method.  <code>parent</code> may be
-     * <code>null</code> if the <code>MimeBodyPart</code> is being removed
-     * from its containing <code>MimeMultipart</code>.
-     * @since   JavaMail 1.1
-     */
-    public void setParent(MimeMultipart parent) {
-        this.parent = parent;
-    }
-
-    /**
-     * Return the size of the content of this body part in bytes.
-     * Return -1 if the size cannot be determined. <p>
-     *
-     * Note that this number may not be an exact measure of the
-     * content size and may or may not account for any transfer
-     * encoding of the content. <p>
-     *
-     * This implementation returns the size of the <code>content</code>
-     * array (if not null), or, if <code>contentStream</code> is not
-     * null, and the <code>available</code> method returns a positive
-     * number, it returns that number as the size.  Otherwise, it returns
-     * -1.
-     *
-     * @return size in bytes, or -1 if not known
-     */
-    public int getSize() {
-
-        if (mimePart != null) {
-            try {
-                return mimePart.read().available();
-            } catch (IOException ex) {
-                return -1;
-            }
-        }
-        if (content != null)
-            return contentLength;
-        if (contentStream != null) {
-            try {
-                int size = contentStream.available();
-                // only believe the size if it's greate than zero, since zero
-                // is the default returned by the InputStream class itself
-                if (size > 0)
-                    return size;
-            } catch (IOException ex) {
-                // ignore it
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Return the number of lines for the content of this MimeBodyPart.
-     * Return -1 if this number cannot be determined. <p>
-     *
-     * Note that this number may not be an exact measure of the
-     * content length and may or may not account for any transfer
-     * encoding of the content. <p>
-     *
-     * This implementation returns -1.
-     *
-     * @return number of lines, or -1 if not known
-     */
-     public int getLineCount() {
-        return -1;
-     }
-
-    /**
-     * Returns the value of the RFC 822 "Content-Type" header field.
-     * This represents the content type of the content of this
-     * body part. This value must not be null. If this field is
-     * unavailable, "text/plain" should be returned. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     *
-     * @return  Content-Type of this body part
-     */
-    public String getContentType() {
-        if (mimePart != null) {
-            return mimePart.getContentType();
-        }
-        String s = getHeader("Content-Type", null);
-        if (s == null)
-            s = "text/plain";
-
-        return s;
-    }
-
-    /**
-     * Is this MimeBodyPart of the specified MIME type?  This method
-     * compares <strong>only the <code>primaryType</code> and
-     * <code>subType</code></strong>.
-     * The parameters of the content types are ignored. <p>
-     *
-     * For example, this method will return <code>true</code> when
-     * comparing a MimeBodyPart of content type <strong>"text/plain"</strong>
-     * with <strong>"text/plain; charset=foobar"</strong>. <p>
-     *
-     * If the <code>subType</code> of <code>mimeType</code> is the
-     * special character '*', then the subtype is ignored during the
-     * comparison.
-     */
-    public boolean isMimeType(String mimeType) {
-        boolean result;
-        // XXX - lots of room for optimization here!
-        try {
-            ContentType ct = new ContentType(getContentType());
-            result = ct.match(mimeType);
-        } catch (ParseException ex) {
-            result = getContentType().equalsIgnoreCase(mimeType);
-        }
-        return result;
-    }
-
-    /**
-     * Returns the value of the "Content-Disposition" header field.
-     * This represents the disposition of this part. The disposition
-     * describes how the part should be presented to the user. <p>
-     *
-     * If the Content-Disposition field is unavailable,
-     * null is returned. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     *
-     * @see #headers
-     */
-    public String getDisposition() throws MessagingException {
-        String s = getHeader("Content-Disposition", null);
-
-        if (s == null)
-            return null;
-
-        ContentDisposition cd = new ContentDisposition(s);
-        return cd.getDisposition();
-    }
-
-    /**
-     * Set the "Content-Disposition" header field of this body part.
-     * If the disposition is null, any existing "Content-Disposition"
-     * header field is removed.
-     *
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setDisposition(String disposition) throws MessagingException {
-        if (disposition == null)
-            removeHeader("Content-Disposition");
-        else {
-            String s = getHeader("Content-Disposition", null);
-            if (s != null) {
-                /* A Content-Disposition header already exists ..
-                 *
-                 * Override disposition, but attempt to retain
-                 * existing disposition parameters
-                 */
-                ContentDisposition cd = new ContentDisposition(s);
-                cd.setDisposition(disposition);
-                disposition = cd.toString();
-            }
-            setHeader("Content-Disposition", disposition);
-        }
-    }
-
-    /**
-     * Returns the content transfer encoding from the
-     * "Content-Transfer-Encoding" header
-     * field. Returns <code>null</code> if the header is unavailable
-     * or its value is absent. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     *
-     * @see #headers
-     */
-    public String getEncoding() throws MessagingException {
-        String s = getHeader("Content-Transfer-Encoding", null);
-
-        if (s == null)
-            return null;
-
-        s = s.trim();   // get rid of trailing spaces
-        // quick check for known values to avoid unnecessary use
-        // of tokenizer.
-        if (s.equalsIgnoreCase("7bit") || s.equalsIgnoreCase("8bit") ||
-            s.equalsIgnoreCase("quoted-printable") ||
-            s.equalsIgnoreCase("base64"))
-            return s;
-
-        // Tokenize the header to obtain the encoding (skip comments)
-        HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-
-        HeaderTokenizer.Token tk;
-        int tkType;
-
-        for (;;) {
-            tk = h.next(); // get a token
-            tkType = tk.getType();
-            if (tkType == HeaderTokenizer.Token.EOF)
-            break; // done
-            else if (tkType == HeaderTokenizer.Token.ATOM)
-            return tk.getValue();
-            else // invalid token, skip it.
-            continue;
-        }
-        return s;
-    }
-
-    /**
-     * Returns the value of the "Content-ID" header field. Returns
-     * <code>null</code> if the field is unavailable or its value is
-     * absent. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     */
-    public String getContentID() {
-        return getHeader("Content-ID", null);
-    }
-
-    /**
-     * Set the "Content-ID" header field of this body part.
-     * If the <code>cid</code> parameter is null, any existing
-     * "Content-ID" is removed.
-     *
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     * @since           JavaMail 1.3
-     */
-    public void setContentID(String cid) {
-        if (cid == null)
-            removeHeader("Content-ID");
-        else
-            setHeader("Content-ID", cid);
-    }
-
-    /**
-     * Return the value of the "Content-MD5" header field. Returns
-     * <code>null</code> if this field is unavailable or its value
-     * is absent. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     */
-    public String getContentMD5() {
-        return getHeader("Content-MD5", null);
-    }
-
-    /**
-     * Set the "Content-MD5" header field of this body part.
-     *
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setContentMD5(String md5) {
-        setHeader("Content-MD5", md5);
-    }
-
-    /**
-     * Get the languages specified in the Content-Language header
-     * of this MimeBodyPart. The Content-Language header is defined by
-     * RFC 1766. Returns <code>null</code> if this header is not
-     * available or its value is absent. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     */
-    public String[] getContentLanguage() throws MessagingException {
-        String s = getHeader("Content-Language", null);
-
-        if (s == null)
-            return null;
-
-        // Tokenize the header to obtain the Language-tags (skip comments)
-        HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-        FinalArrayList v = new FinalArrayList();
-
-        HeaderTokenizer.Token tk;
-        int tkType;
-
-        while (true) {
-            tk = h.next(); // get a language-tag
-            tkType = tk.getType();
-            if (tkType == HeaderTokenizer.Token.EOF)
-            break; // done
-            else if (tkType == HeaderTokenizer.Token.ATOM) v.add(tk.getValue());
-            else // invalid token, skip it.
-            continue;
-        }
-
-        if (v.size() == 0)
-            return null;
-
-        return (String[])v.toArray(new String[v.size()]);
-    }
-
-    /**
-     * Set the Content-Language header of this MimeBodyPart. The
-     * Content-Language header is defined by RFC 1766.
-     *
-     * @param languages         array of language tags
-     */
-    public void setContentLanguage(String[] languages) {
-        StringBuffer sb = new StringBuffer(languages[0]);
-        for (int i = 1; i < languages.length; i++)
-            sb.append(',').append(languages[i]);
-        setHeader("Content-Language", sb.toString());
-    }
-
-    /**
-     * Returns the "Content-Description" header field of this body part.
-     * This typically associates some descriptive information with
-     * this part. Returns null if this field is unavailable or its
-     * value is absent. <p>
-     *
-     * If the Content-Description field is encoded as per RFC 2047,
-     * it is decoded and converted into Unicode. If the decoding or
-     * conversion fails, the raw data is returned as is. <p>
-     *
-     * This implementation uses <code>getHeader(name)</code>
-     * to obtain the requisite header field.
-     *
-     * @return  content description
-     */
-    public String getDescription() {
-        String rawvalue = getHeader("Content-Description", null);
-
-        if (rawvalue == null)
-            return null;
-
-        try {
-            return MimeUtility.decodeText(MimeUtility.unfold(rawvalue));
-        } catch (UnsupportedEncodingException ex) {
-            return rawvalue;
-        }
-    }
-
-    /**
-     * Set the "Content-Description" header field for this body part.
-     * If the description parameter is <code>null</code>, then any
-     * existing "Content-Description" fields are removed. <p>
-     *
-     * If the description contains non US-ASCII characters, it will
-     * be encoded using the platform's default charset. If the
-     * description contains only US-ASCII characters, no encoding
-     * is done and it is used as is. <p>
-     *
-     * Note that if the charset encoding process fails, a
-     * MessagingException is thrown, and an UnsupportedEncodingException
-     * is included in the chain of nested exceptions within the
-     * MessagingException.
-     *
-     * @param description content description
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     * @exception       MessagingException An
-     *                  UnsupportedEncodingException may be included
-     *                  in the exception chain if the charset
-     *                  conversion fails.
-     */
-    public void setDescription(String description) throws MessagingException {
-        setDescription(description, null);
-    }
-
-    /**
-     * Set the "Content-Description" header field for this body part.
-     * If the description parameter is <code>null</code>, then any
-     * existing "Content-Description" fields are removed. <p>
-     *
-     * If the description contains non US-ASCII characters, it will
-     * be encoded using the specified charset. If the description
-     * contains only US-ASCII characters, no encoding  is done and
-     * it is used as is. <p>
-     *
-     * Note that if the charset encoding process fails, a
-     * MessagingException is thrown, and an UnsupportedEncodingException
-     * is included in the chain of nested exceptions within the
-     * MessagingException.
-     *
-     * @param   description     Description
-     * @param   charset         Charset for encoding
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     * @exception       MessagingException An
-     *                  UnsupportedEncodingException may be included
-     *                  in the exception chain if the charset
-     *                  conversion fails.
-     */
-    public void setDescription(String description, String charset)
-                throws MessagingException {
-        if (description == null) {
-            removeHeader("Content-Description");
-            return;
-        }
-
-        try {
-            setHeader("Content-Description", MimeUtility.fold(21,
-            MimeUtility.encodeText(description, charset, null)));
-        } catch (UnsupportedEncodingException uex) {
-            throw new MessagingException("Encoding error", uex);
-        }
-    }
-
-    /**
-     * Get the filename associated with this body part. <p>
-     *
-     * Returns the value of the "filename" parameter from the
-     * "Content-Disposition" header field of this body part. If its
-     * not available, returns the value of the "name" parameter from
-     * the "Content-Type" header field of this body part.
-     * Returns <code>null</code> if both are absent.
-     *
-     * @return  filename
-     */
-    public String getFileName() throws MessagingException {
-        String filename = null;
-        String s = getHeader("Content-Disposition", null);
-
-        if (s != null) {
-            // Parse the header ..
-            ContentDisposition cd = new ContentDisposition(s);
-            filename = cd.getParameter("filename");
-        }
-        if (filename == null) {
-            // Still no filename ? Try the "name" ContentType parameter
-            s = getHeader("Content-Type", null);
-            if (s != null) {
-            try {
-                ContentType ct = new ContentType(s);
-                filename = ct.getParameter("name");
-            } catch (ParseException pex) { }    // ignore it
-            }
-        }
-        return filename;
-    }
-
-    /**
-     * Set the filename associated with this body part, if possible. <p>
-     *
-     * Sets the "filename" parameter of the "Content-Disposition"
-     * header field of this body part.
-     *
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setFileName(String filename) throws MessagingException {
-        // Set the Content-Disposition "filename" parameter
-        String s = getHeader("Content-Disposition", null);
-        ContentDisposition cd =
-            new ContentDisposition(s == null ? ATTACHMENT : s);
-        cd.setParameter("filename", filename);
-        setHeader("Content-Disposition", cd.toString());
-
-        /* Also attempt to set the Content-Type "name" parameter,
-         * to satisfy ancient MUAs.
-         * XXX: This is not RFC compliant, and hence should really
-         * be conditional based on some property. Fix this once we
-         * figure out how to get at Properties from here !
-         */
-        s = getHeader("Content-Type", null);
-        if (s != null) {
-            try {
-            ContentType cType = new ContentType(s);
-            cType.setParameter("name", filename);
-            setHeader("Content-Type", cType.toString());
-            } catch (ParseException pex) { }    // ignore it
-        }
-    }
-
-    /**
-     * Return a decoded input stream for this body part's "content". <p>
-     *
-     * This implementation obtains the input stream from the DataHandler.
-     * That is, it invokes getDataHandler().getInputStream();
-     *
-     * @return          an InputStream
-     * @exception       IOException this is typically thrown by the
-     *                  DataHandler. Refer to the documentation for
-     *                  javax.activation.DataHandler for more details.
-     *
-     * @see     #getContentStream
-     * @see     DataHandler#getInputStream
-     */
-    public InputStream getInputStream()
-                throws IOException {
-        return getDataHandler().getInputStream();
-    }
-
-   /**
-     * Produce the raw bytes of the content. This method is used
-     * when creating a DataHandler object for the content. Subclasses
-     * that can provide a separate input stream for just the MimeBodyPart
-     * content might want to override this method. <p>
-     *
-     * @see #content
-     */
-    /*package*/ InputStream getContentStream() throws MessagingException {
-        if (mimePart != null) {
-            return mimePart.read();
-        }
-        if (contentStream != null)
-            return ((SharedInputStream)contentStream).newStream(0, -1);
-        if (content != null)
-            return new ByteArrayInputStream(content,start,contentLength);
-
-        throw new MessagingException("No content");
-    }
-
-    /**
-     * Return an InputStream to the raw data with any Content-Transfer-Encoding
-     * intact.  This method is useful if the "Content-Transfer-Encoding"
-     * header is incorrect or corrupt, which would prevent the
-     * <code>getInputStream</code> method or <code>getContent</code> method
-     * from returning the correct data.  In such a case the application may
-     * use this method and attempt to decode the raw data itself. <p>
-     *
-     * This implementation simply calls the <code>getContentStream</code>
-     * method.
-     *
-     * @see     #getInputStream
-     * @see     #getContentStream
-     * @since   JavaMail 1.2
-     */
-    public InputStream getRawInputStream() throws MessagingException {
-        return getContentStream();
-    }
-
-    /**
-     * Return a DataHandler for this body part's content. <p>
-     *
-     * The implementation provided here works just like the
-     * the implementation in MimeMessage.
-     */
-    public DataHandler getDataHandler() {
-        if (mimePart != null) {
-            //return an inputstream
-            return new DataHandler(new DataSource() {
-
-                public InputStream getInputStream() throws IOException {
-                    return mimePart.read();
-                }
-
-                public OutputStream getOutputStream() throws IOException {
-                    throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option");
-                }
-
-                public String getContentType() {
-                    return mimePart.getContentType();
-                }
-
-                public String getName() {
-                    return "MIMEPart Wrapped DataSource";
-                }
-            });
-        }
-        if (dh == null)
-            dh = new DataHandler(new MimePartDataSource(this));
-        return dh;
-    }
-
-    /**
-     * Return the content as a java object. The type of the object
-     * returned is of course dependent on the content itself. For
-     * example, the native format of a text/plain content is usually
-     * a String object. The native format for a "multipart"
-     * content is always a MimeMultipart subclass. For content types that are
-     * unknown to the DataHandler system, an input stream is returned
-     * as the content. <p>
-     *
-     * This implementation obtains the content from the DataHandler.
-     * That is, it invokes getDataHandler().getContent();
-     *
-     * @return          Object
-     * @exception       IOException this is typically thrown by the
-     *                  DataHandler. Refer to the documentation for
-     *                  javax.activation.DataHandler for more details.
-     */
-    public Object getContent() throws IOException {
-        return getDataHandler().getContent();
-    }
-
-    /**
-     * This method provides the mechanism to set this body part's content.
-     * The given DataHandler object should wrap the actual content.
-     *
-     * @param   dh      The DataHandler for the content
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setDataHandler(DataHandler dh) {
-        if (mimePart != null) {
-            mimePart = null;
-        }
-        this.dh = dh;
-        this.content = null;
-        this.contentStream = null;
-        removeHeader("Content-Type");
-        removeHeader("Content-Transfer-Encoding");
-    }
-
-    /**
-     * A convenience method for setting this body part's content. <p>
-     *
-     * The content is wrapped in a DataHandler object. Note that a
-     * DataContentHandler class for the specified type should be
-     * available to the JavaMail implementation for this to work right.
-     * That is, to do <code>setContent(foobar, "application/x-foobar")</code>,
-     * a DataContentHandler for "application/x-foobar" should be installed.
-     * Refer to the Java Activation Framework for more information.
-     *
-     * @param   o       the content object
-     * @param   type    Mime type of the object
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setContent(Object o, String type) {
-        if (mimePart != null) {
-            mimePart = null;
-        }
-        if (o instanceof MimeMultipart) {
-            setContent((MimeMultipart)o);
-        } else {
-            setDataHandler(new DataHandler(o, type));
-        }
-    }
-
-    /**
-     * Convenience method that sets the given String as this
-     * part's content, with a MIME type of "text/plain". If the
-     * string contains non US-ASCII characters, it will be encoded
-     * using the platform's default charset. The charset is also
-     * used to set the "charset" parameter. <p>
-     *
-     * Note that there may be a performance penalty if
-     * <code>text</code> is large, since this method may have
-     * to scan all the characters to determine what charset to
-     * use. <p>
-     * If the charset is already known, use the
-     * setText() version that takes the charset parameter.
-     *
-     * @see     #setText(String text, String charset)
-     */
-    public void setText(String text) {
-        setText(text, null);
-    }
-
-    /**
-     * Convenience method that sets the given String as this part's
-     * content, with a MIME type of "text/plain" and the specified
-     * charset. The given Unicode string will be charset-encoded
-     * using the specified charset. The charset is also used to set
-     * the "charset" parameter.
-     */
-    public void setText(String text, String charset) {
-        if (charset == null) {
-            if (MimeUtility.checkAscii(text) != MimeUtility.ALL_ASCII)
-                charset = MimeUtility.getDefaultMIMECharset();
-            else
-                charset = "us-ascii";
-        }
-        setContent(text, "text/plain; charset=" +
-                MimeUtility.quote(charset, HeaderTokenizer.MIME));
-    }
-
-    /**
-     * This method sets the body part's content to a MimeMultipart object.
-     *
-     * @param  mp       The multipart object that is the Message's content
-     * @exception       IllegalStateException if this body part is
-     *                  obtained from a READ_ONLY folder.
-     */
-    public void setContent(MimeMultipart mp) {
-        if (mimePart != null) {
-            mimePart = null;
-        }
-        setDataHandler(new DataHandler(mp, mp.getContentType().toString()));
-        mp.setParent(this);
-    }
-
-    /**
-     * Output the body part as an RFC 822 format stream.
-     *
-     * @exception MessagingException
-     * @exception IOException   if an error occurs writing to the
-     *                          stream or if an error is generated
-     *                          by the javax.activation layer.
-     * @see DataHandler#writeTo
-     */
-    public void writeTo(OutputStream os)
-                                throws IOException, MessagingException {
-
-        // First, write out the header
-        List hdrLines = headers.getAllHeaderLines();
-        int sz = hdrLines.size();
-        for( int i=0; i<sz; i++ )
-            OutputUtil.writeln((String)hdrLines.get(i),os);
-
-        // The CRLF separator between header and content
-        OutputUtil.writeln(os);
-
-        // Finally, the content.
-        // XXX: May need to account for ESMTP ?
-        if (contentStream != null) {
-            ((SharedInputStream)contentStream).writeTo(0,-1,os);
-        } else
-        if (content != null) {
-            os.write(content,start,contentLength);
-        } else
-        if (dh!=null) {
-            // this is the slowest route, so try it as the last resort
-            OutputStream wos = MimeUtility.encode(os, getEncoding());
-            getDataHandler().writeTo(wos);
-            if(os!=wos)
-                wos.flush(); // Needed to complete encoding
-        } else if (mimePart != null) {
-            OutputStream wos = MimeUtility.encode(os, getEncoding());
-            getDataHandler().writeTo(wos);
-            if(os!=wos)
-                wos.flush(); // Needed to complete encoding
-        }else {
-            throw new MessagingException("no content");
-        }
-    }
-
-    /**
-     * Get all the headers for this header_name. Note that certain
-     * headers may be encoded as per RFC 2047 if they contain
-     * non US-ASCII characters and these should be decoded.
-     *
-     * @param   name    name of header
-     * @return  array of headers
-     * @see     MimeUtility
-     */
-    public String[] getHeader(String name) {
-        return headers.getHeader(name);
-    }
-
-    /**
-     * Get all the headers for this header name, returned as a single
-     * String, with headers separated by the delimiter. If the
-     * delimiter is <code>null</code>, only the first header is
-     * returned.
-     *
-     * @param name              the name of this header
-     * @param delimiter         delimiter between fields in returned string
-     * @return                  the value fields for all headers with
-     *                          this name
-     */
-    public String getHeader(String name, String delimiter) {
-        return headers.getHeader(name, delimiter);
-    }
-
-    /**
-     * Set the value for this header_name. Replaces all existing
-     * header values with this new value. Note that RFC 822 headers
-     * must contain only US-ASCII characters, so a header that
-     * contains non US-ASCII characters must be encoded as per the
-     * rules of RFC 2047.
-     *
-     * @param   name    header name
-     * @param   value   header value
-     * @see     MimeUtility
-     */
-    public void setHeader(String name, String value) {
-        headers.setHeader(name, value);
-    }
-
-    /**
-     * Add this value to the existing values for this header_name.
-     * Note that RFC 822 headers must contain only US-ASCII
-     * characters, so a header that contains non US-ASCII characters
-     * must be encoded as per the rules of RFC 2047.
-     *
-     * @param   name    header name
-     * @param   value   header value
-     * @see     MimeUtility
-     */
-    public void addHeader(String name, String value) {
-        headers.addHeader(name, value);
-    }
-
-    /**
-     * Remove all headers with this name.
-     */
-    public void removeHeader(String name) {
-        headers.removeHeader(name);
-    }
-
-    /**
-     * Return all the headers from this Message as an Enumeration of
-     * Header objects.
-     */
-    public FinalArrayList getAllHeaders() {
-        return headers.getAllHeaders();
-    }
-
-
-    /**
-     * Add a header line to this body part
-     */
-    public void addHeaderLine(String line) {
-        headers.addHeaderLine(line);
-    }
-
-    /**
-     * Examine the content of this body part and update the appropriate
-     * MIME headers.  Typical headers that get set here are
-     * <code>Content-Type</code> and <code>Content-Transfer-Encoding</code>.
-     * Headers might need to be updated in two cases:
-     *
-     * <br>
-     * - A message being crafted by a mail application will certainly
-     * need to activate this method at some point to fill up its internal
-     * headers.
-     *
-     * <br>
-     * - A message read in from a Store will have obtained
-     * all its headers from the store, and so doesn't need this.
-     * However, if this message is editable and if any edits have
-     * been made to either the content or message structure, we might
-     * need to resync our headers.
-     *
-     * <br>
-     * In both cases this method is typically called by the
-     * <code>Message.saveChanges</code> method.
-     */
-    protected void updateHeaders() throws MessagingException {
-        DataHandler dh = getDataHandler();
-        /*
-         * Code flow indicates null is never returned from
-         * getdataHandler() - findbugs
-         */
-        //if (dh == null) // Huh ?
-        //    return;
-
-        try {
-            String type = dh.getContentType();
-            boolean composite = false;
-            boolean needCTHeader = getHeader("Content-Type") == null;
-
-            ContentType cType = new ContentType(type);
-            if (cType.match("multipart/*")) {
-                // If multipart, recurse
-                composite = true;
-                Object o = dh.getContent();
-                ((MimeMultipart) o).updateHeaders();
-            } else if (cType.match("message/rfc822")) {
-                composite = true;
-            }
-
-            // Content-Transfer-Encoding, but only if we don't
-            // already have one
-            if (!composite) {   // not allowed on composite parts
-                if (getHeader("Content-Transfer-Encoding") == null)
-                    setEncoding(MimeUtility.getEncoding(dh));
-
-                if (needCTHeader && setDefaultTextCharset &&
-                        cType.match("text/*") &&
-                        cType.getParameter("charset") == null) {
-                    /*
-                     * Set a default charset for text parts.
-                     * We really should examine the data to determine
-                     * whether or not it's all ASCII, but that's too
-                     * expensive so we make an assumption:  If we
-                     * chose 7bit encoding for this data, it's probably
-                     * ASCII.  (MimeUtility.getEncoding will choose
-                     * 7bit only in this case, but someone might've
-                     * set the Content-Transfer-Encoding header manually.)
-                     */
-                    String charset;
-                    String enc = getEncoding();
-                    if (enc != null && enc.equalsIgnoreCase("7bit"))
-                        charset = "us-ascii";
-                    else
-                        charset = MimeUtility.getDefaultMIMECharset();
-                    cType.setParameter("charset", charset);
-                    type = cType.toString();
-                }
-            }
-
-            // Now, let's update our own headers ...
-
-            // Content-type, but only if we don't already have one
-            if (needCTHeader) {
-                /*
-                 * Pull out "filename" from Content-Disposition, and
-                 * use that to set the "name" parameter. This is to
-                 * satisfy older MUAs (DtMail, Roam and probably
-                 * a bunch of others).
-                 */
-                String s = getHeader("Content-Disposition", null);
-                if (s != null) {
-                    // Parse the header ..
-                    ContentDisposition cd = new ContentDisposition(s);
-                    String filename = cd.getParameter("filename");
-                    if (filename != null) {
-                        cType.setParameter("name", filename);
-                        type = cType.toString();
-                    }
-                }
-
-                setHeader("Content-Type", type);
-            }
-        } catch (IOException ex) {
-            throw new MessagingException("IOException updating headers", ex);
-        }
-    }
-
-    private void setEncoding(String encoding) {
-            setHeader("Content-Transfer-Encoding", encoding);
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeMultipart.java     1.31 03/01/29
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
-
-/**
- * The MimeMultipart class is an implementation
- * that uses MIME conventions for the multipart data. <p>
- *
- * A MimeMultipart is obtained from a MimeBodyPart whose primary type
- * is "multipart" (by invoking the part's <code>getContent()</code> method)
- * or it can be created by a client as part of creating a new MimeMessage. <p>
- *
- * The default multipart subtype is "mixed".  The other multipart
- * subtypes, such as "alternative", "related", and so on, can be
- * implemented as subclasses of MimeMultipart with additional methods
- * to implement the additional semantics of that type of multipart
- * content. The intent is that service providers, mail JavaBean writers
- * and mail clients will write many such subclasses and their Command
- * Beans, and will install them into the JavaBeans Activation
- * Framework, so that any JavaMail implementation and its clients can
- * transparently find and use these classes. Thus, a MIME multipart
- * handler is treated just like any other type handler, thereby
- * decoupling the process of providing multipart handlers from the
- * JavaMail API. Lacking these additional MimeMultipart subclasses,
- * all subtypes of MIME multipart data appear as MimeMultipart objects. <p>
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the <code>MimeMultipart(String subtype)</code>
- * constructor.  For example, to create a "multipart/alternative" object,
- * use <code>new MimeMultipart("alternative")</code>.
- *
- * @version 1.31, 03/01/29
- * @author  John Mani
- * @author  Bill Shannon
- * @author  Max Spivak
- */
-
-//BM MimeMultipart can extend this
-public  class MimeMultipart {
-
-    /**
-     * The DataSource supplying our InputStream.
-     */
-    protected DataSource ds = null;
-
-    /**
-     * Have we parsed the data from our InputStream yet?
-     * Defaults to true; set to false when our constructor is
-     * given a DataSource with an InputStream that we need to
-     * parse.
-     */
-    protected boolean parsed = true;
-
-    /**
-     * Vector of MimeBodyPart objects.
-     */
-    protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts
-
-    /**
-     * This field specifies the content-type of this multipart
-     * object. It defaults to "multipart/mixed".
-     */
-    protected ContentType contentType;
-
-    /**
-     * The <code>MimeBodyPart</code> containing this <code>MimeMultipart</code>,
-     * if known.
-     * @since   JavaMail 1.1
-     */
-    protected MimeBodyPart parent;
-
-    protected static final boolean ignoreMissingEndBoundary;
-    static {
-        ignoreMissingEndBoundary = SAAJUtil.getSystemBoolean("saaj.mime.multipart.ignoremissingendboundary");
-    }
-
-    /**
-     * Default constructor. An empty MimeMultipart object
-     * is created. Its content type is set to "multipart/mixed".
-     * A unique boundary string is generated and this string is
-     * setup as the "boundary" parameter for the
-     * <code>contentType</code> field. <p>
-     *
-     * MimeBodyParts may be added later.
-     */
-    public MimeMultipart() {
-        this("mixed");
-    }
-
-    /**
-     * Construct a MimeMultipart object of the given subtype.
-     * A unique boundary string is generated and this string is
-     * setup as the "boundary" parameter for the
-     * <code>contentType</code> field. <p>
-     *
-     * MimeBodyParts may be added later.
-     */
-    public MimeMultipart(String subtype) {
-        //super();
-        /*
-         * Compute a boundary string.
-         */
-        String boundary = UniqueValue.getUniqueBoundaryValue();
-        contentType = new ContentType("multipart", subtype, null);
-        contentType.setParameter("boundary", boundary);
-    }
-
-    /**
-     * Constructs a MimeMultipart object and its bodyparts from the
-     * given DataSource. <p>
-     *
-     * This constructor handles as a special case the situation where the
-     * given DataSource is a MultipartDataSource object.
-     *
-     * Otherwise, the DataSource is assumed to provide a MIME multipart
-     * byte stream.  The <code>parsed</code> flag is set to false.  When
-     * the data for the body parts are needed, the parser extracts the
-     * "boundary" parameter from the content type of this DataSource,
-     * skips the 'preamble' and reads bytes till the terminating
-     * boundary and creates MimeBodyParts for each part of the stream.
-     *
-     * @param   ds      DataSource, can be a MultipartDataSource
-     * @param ct
-     *      This must be the same information as {@link DataSource#getContentType()}.
-     *      All the callers of this method seem to have this object handy, so
-     *      for performance reason this method accepts it. Can be null.
-     */
-    public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException {
-        // 'ds' was not a MultipartDataSource, we have
-        // to parse this ourself.
-        parsed = false;
-        this.ds = ds;
-        if (ct==null)
-            contentType = new ContentType(ds.getContentType());
-        else
-            contentType = ct;
-    }
-
-    /**
-     * Set the subtype. This method should be invoked only on a new
-     * MimeMultipart object created by the client. The default subtype
-     * of such a multipart object is "mixed". <p>
-     *
-     * @param   subtype         Subtype
-     */
-    public  void setSubType(String subtype) {
-        contentType.setSubType(subtype);
-    }
-
-    /**
-     * Return the number of enclosed MimeBodyPart objects.
-     *
-     * @return          number of parts
-     */
-    public  int getCount() throws MessagingException {
-        parse();
-        if (parts == null)
-            return 0;
-
-        return parts.size();
-    }
-
-    /**
-     * Get the specified MimeBodyPart.  BodyParts are numbered starting at 0.
-     *
-     * @param index     the index of the desired MimeBodyPart
-     * @return          the MimeBodyPart
-     * @exception       MessagingException if no such MimeBodyPart exists
-     */
-    public  MimeBodyPart getBodyPart(int index)
-                        throws MessagingException {
-        parse();
-        if (parts == null)
-            throw new IndexOutOfBoundsException("No such BodyPart");
-
-        return (MimeBodyPart)parts.get(index);
-    }
-
-    /**
-     * Get the MimeBodyPart referred to by the given ContentID (CID).
-     * Returns null if the part is not found.
-     *
-     * @param  CID      the ContentID of the desired part
-     * @return          the MimeBodyPart
-     */
-    public  MimeBodyPart getBodyPart(String CID)
-                        throws MessagingException {
-        parse();
-
-        int count = getCount();
-        for (int i = 0; i < count; i++) {
-           MimeBodyPart part = getBodyPart(i);
-           String s = part.getContentID();
-           // Old versions of AXIS2 put angle brackets around the content
-           // id but not the start param
-           String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "")
-                   :null;
-           if (s != null && (s.equals(CID) || CID.equals(sNoAngle)))
-                return part;
-        }
-        return null;
-    }
-
-    /**
-     * Update headers. The default implementation here just
-     * calls the <code>updateHeaders</code> method on each of its
-     * children BodyParts. <p>
-     *
-     * Note that the boundary parameter is already set up when
-     * a new and empty MimeMultipart object is created. <p>
-     *
-     * This method is called when the <code>saveChanges</code>
-     * method is invoked on the Message object containing this
-     * MimeMultipart. This is typically done as part of the Message
-     * send process, however note that a client is free to call
-     * it any number of times. So if the header updating process is
-     * expensive for a specific MimeMultipart subclass, then it
-     * might itself want to track whether its internal state actually
-     * did change, and do the header updating only if necessary.
-     */
-    protected void updateHeaders() throws MessagingException {
-        for (int i = 0; i < parts.size(); i++)
-            ((MimeBodyPart)parts.get(i)).updateHeaders();
-    }
-
-    /**
-     * Iterates through all the parts and outputs each Mime part
-     * separated by a boundary.
-     */
-    public void writeTo(OutputStream os)
-            throws IOException, MessagingException {
-        parse();
-
-        String boundary = "--" + contentType.getParameter("boundary");
-
-        for (int i = 0; i < parts.size(); i++) {
-            OutputUtil.writeln(boundary, os); // put out boundary
-            getBodyPart(i).writeTo(os);
-            OutputUtil.writeln(os); // put out empty line
-        }
-
-        // put out last boundary
-        OutputUtil.writeAsAscii(boundary, os);
-        OutputUtil.writeAsAscii("--", os);
-        os.flush();
-    }
-
-    /**
-     * Parse the InputStream from our DataSource, constructing the
-     * appropriate MimeBodyParts.  The <code>parsed</code> flag is
-     * set to true, and if true on entry nothing is done.  This
-     * method is called by all other methods that need data for
-     * the body parts, to make sure the data has been parsed.
-     *
-     * @since   JavaMail 1.2
-     */
-    protected  void parse() throws MessagingException {
-        if (parsed)
-            return;
-
-        InputStream in;
-        SharedInputStream sin = null;
-        long start = 0, end = 0;
-        boolean foundClosingBoundary = false;
-
-        try {
-            in = ds.getInputStream();
-            if (!(in instanceof ByteArrayInputStream) &&
-                !(in instanceof BufferedInputStream) &&
-                !(in instanceof SharedInputStream))
-                in = new BufferedInputStream(in);
-        } catch (Exception ex) {
-            throw new MessagingException("No inputstream from datasource");
-        }
-        if (in instanceof SharedInputStream)
-            sin = (SharedInputStream)in;
-
-        String boundary = "--" + contentType.getParameter("boundary");
-        byte[] bndbytes = ASCIIUtility.getBytes(boundary);
-        int bl = bndbytes.length;
-
-        ByteOutputStream buf = null;
-        try {
-            // Skip the preamble
-            LineInputStream lin = new LineInputStream(in);
-            String line;
-            while ((line = lin.readLine()) != null) {
-                /*
-                 * Strip trailing whitespace.  Can't use trim method
-                 * because it's too aggressive.  Some bogus MIME
-                 * messages will include control characters in the
-                 * boundary string.
-                 */
-                int i;
-                for (i = line.length() - 1; i >= 0; i--) {
-                    char c = line.charAt(i);
-                    if (!(c == ' ' || c == '\t'))
-                        break;
-                }
-                line = line.substring(0, i + 1);
-                if (line.equals(boundary))
-                    break;
-            }
-            if (line == null)
-                throw new MessagingException("Missing start boundary");
-
-            /*
-             * Read and process body parts until we see the
-             * terminating boundary line (or EOF).
-             */
-            boolean done = false;
-        getparts:
-            while (!done) {
-                InternetHeaders headers = null;
-                if (sin != null) {
-                    start = sin.getPosition();
-                    // skip headers
-                    while ((line = lin.readLine()) != null && line.length() > 0)
-                        ;
-                    if (line == null) {
-                        if (!ignoreMissingEndBoundary) {
-                           throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
-                        }
-                        // assume there's just a missing end boundary
-                        break getparts;
-                    }
-                } else {
-                    // collect the headers for this body part
-                    headers = createInternetHeaders(in);
-                }
-
-                if (!in.markSupported())
-                    throw new MessagingException("Stream doesn't support mark");
-
-                buf = null;
-                // if we don't have a shared input stream, we copy the data
-                if (sin == null)
-                    buf = new ByteOutputStream();
-                int b;
-                boolean bol = true;    // beginning of line flag
-                // the two possible end of line characters
-                int eol1 = -1, eol2 = -1;
-
-                /*
-                 * Read and save the content bytes in buf.
-                 */
-                for (;;) {
-                    if (bol) {
-                        /*
-                         * At the beginning of a line, check whether the
-                         * next line is a boundary.
-                         */
-                        int i;
-                        in.mark(bl + 4 + 1000); // bnd + "--\r\n" + lots of LWSP
-                        // read bytes, matching against the boundary
-                        for (i = 0; i < bl; i++)
-                            if (in.read() != bndbytes[i])
-                                break;
-                        if (i == bl) {
-                            // matched the boundary, check for last boundary
-                            int b2 = in.read();
-                            if (b2 == '-') {
-                                if (in.read() == '-') {
-                                    done = true;
-                                    foundClosingBoundary = true;
-                                    break;      // ignore trailing text
-                                }
-                            }
-                            // skip linear whitespace
-                            while (b2 == ' ' || b2 == '\t')
-                                b2 = in.read();
-                            // check for end of line
-                            if (b2 == '\n')
-                                break;  // got it!  break out of the loop
-                            if (b2 == '\r') {
-                                in.mark(1);
-                                if (in.read() != '\n')
-                                    in.reset();
-                                break;  // got it!  break out of the loop
-                            }
-                        }
-                        // failed to match, reset and proceed normally
-                        in.reset();
-
-                        // if this is not the first line, write out the
-                        // end of line characters from the previous line
-                        if (buf != null && eol1 != -1) {
-                            buf.write(eol1);
-                            if (eol2 != -1)
-                                buf.write(eol2);
-                            eol1 = eol2 = -1;
-                        }
-                    }
-
-                    // read the next byte
-                    if ((b = in.read()) < 0) {
-                        done = true;
-                        break;
-                    }
-
-                    /*
-                     * If we're at the end of the line, save the eol characters
-                     * to be written out before the beginning of the next line.
-                     */
-                    if (b == '\r' || b == '\n') {
-                        bol = true;
-                        if (sin != null)
-                            end = sin.getPosition() - 1;
-                        eol1 = b;
-                        if (b == '\r') {
-                            in.mark(1);
-                            if ((b = in.read()) == '\n')
-                                eol2 = b;
-                            else
-                                in.reset();
-                        }
-                    } else {
-                        bol = false;
-                        if (buf != null)
-                            buf.write(b);
-                    }
-                }
-
-                /*
-                 * Create a MimeBody element to represent this body part.
-                 */
-                MimeBodyPart part;
-                if (sin != null)
-                    part = createMimeBodyPart(sin.newStream(start, end));
-                else
-                    part = createMimeBodyPart(headers, buf.getBytes(), buf.getCount());
-                addBodyPart(part);
-            }
-        } catch (IOException ioex) {
-            throw new MessagingException("IO Error", ioex);
-        } finally {
-            if (buf != null)
-                buf.close();
-        }
-
-        if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) {
-            throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
-        }
-        parsed = true;
-    }
-
-    /**
-     * Create and return an InternetHeaders object that loads the
-     * headers from the given InputStream.  Subclasses can override
-     * this method to return a subclass of InternetHeaders, if
-     * necessary.  This implementation simply constructs and returns
-     * an InternetHeaders object.
-     *
-     * @param   is      the InputStream to read the headers from
-     * @exception       MessagingException
-     * @since           JavaMail 1.2
-     */
-    protected InternetHeaders createInternetHeaders(InputStream is)
-                                throws MessagingException {
-        return new InternetHeaders(is);
-    }
-
-    /**
-     * Create and return a MimeBodyPart object to represent a
-     * body part parsed from the InputStream.  Subclasses can override
-     * this method to return a subclass of MimeBodyPart, if
-     * necessary.  This implementation simply constructs and returns
-     * a MimeBodyPart object.
-     *
-     * @param   headers         the headers for the body part
-     * @param   content         the content of the body part
-     * @since                   JavaMail 1.2
-     */
-    protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) {
-            return new MimeBodyPart(headers, content,len);
-    }
-
-    /**
-     * Create and return a MimeBodyPart object to represent a
-     * body part parsed from the InputStream.  Subclasses can override
-     * this method to return a subclass of MimeBodyPart, if
-     * necessary.  This implementation simply constructs and returns
-     * a MimeBodyPart object.
-     *
-     * @param   is              InputStream containing the body part
-     * @exception               MessagingException
-     * @since                   JavaMail 1.2
-     */
-    protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException {
-            return new MimeBodyPart(is);
-    }
-
-    /**
-     * Setup this MimeMultipart object from the given MultipartDataSource. <p>
-     *
-     * The method adds the MultipartDataSource's MimeBodyPart
-     * objects into this MimeMultipart. This MimeMultipart's contentType is
-     * set to that of the MultipartDataSource. <p>
-     *
-     * This method is typically used in those cases where one
-     * has a multipart data source that has already been pre-parsed into
-     * the individual body parts (for example, an IMAP datasource), but
-     * needs to create an appropriate MimeMultipart subclass that represents
-     * a specific multipart subtype.
-     *
-     * @param   mp      MimeMultipart datasource
-     */
-
-    protected void setMultipartDataSource(MultipartDataSource mp)
-                        throws MessagingException {
-        contentType = new ContentType(mp.getContentType());
-
-        int count = mp.getCount();
-        for (int i = 0; i < count; i++)
-            addBodyPart(mp.getBodyPart(i));
-    }
-
-    /**
-     * Return the content-type of this MimeMultipart. <p>
-     *
-     * This implementation just returns the value of the
-     * <code>contentType</code> field.
-     *
-     * @return  content-type
-     * @see     #contentType
-     */
-    public ContentType getContentType() {
-            return contentType;
-    }
-
-    /**
-     * Remove the specified part from the multipart message.
-     * Shifts all the parts after the removed part down one.
-     *
-     * @param   part    The part to remove
-     * @return          true if part removed, false otherwise
-     * @exception       MessagingException if no such MimeBodyPart exists
-     */
-    public boolean removeBodyPart(MimeBodyPart part) throws MessagingException {
-        if (parts == null)
-            throw new MessagingException("No such body part");
-
-        boolean ret = parts.remove(part);
-        part.setParent(null);
-        return ret;
-    }
-
-    /**
-     * Remove the part at specified location (starting from 0).
-     * Shifts all the parts after the removed part down one.
-     *
-     * @param   index   Index of the part to remove
-     * @exception       IndexOutOfBoundsException if the given index
-     *                  is out of range.
-     */
-    public void removeBodyPart(int index) {
-        if (parts == null)
-            throw new IndexOutOfBoundsException("No such BodyPart");
-
-        MimeBodyPart part = (MimeBodyPart)parts.get(index);
-        parts.remove(index);
-        part.setParent(null);
-    }
-
-    /**
-     * Adds a MimeBodyPart to the multipart.  The MimeBodyPart is appended to
-     * the list of existing Parts.
-     *
-     * @param  part  The MimeBodyPart to be appended
-     */
-    public synchronized void addBodyPart(MimeBodyPart part) {
-        if (parts == null)
-            parts = new FinalArrayList();
-
-        parts.add(part);
-        part.setParent(this);
-    }
-
-    /**
-     * Adds a MimeBodyPart at position <code>index</code>.
-     * If <code>index</code> is not the last one in the list,
-     * the subsequent parts are shifted up. If <code>index</code>
-     * is larger than the number of parts present, the
-     * MimeBodyPart is appended to the end.
-     *
-     * @param  part  The MimeBodyPart to be inserted
-     * @param  index Location where to insert the part
-     */
-    public synchronized void addBodyPart(MimeBodyPart part, int index) {
-        if (parts == null)
-            parts = new FinalArrayList();
-
-        parts.add(index,part);
-        part.setParent(this);
-    }
-
-    /**
-     * Return the <code>MimeBodyPart</code> that contains this <code>MimeMultipart</code>
-     * object, or <code>null</code> if not known.
-     * @since   JavaMail 1.1
-     */
-    MimeBodyPart getParent() {
-        return parent;
-    }
-
-    /**
-     * Set the parent of this <code>MimeMultipart</code> to be the specified
-     * <code>MimeBodyPart</code>.  Normally called by the <code>Message</code>
-     * or <code>MimeBodyPart</code> <code>setContent(MimeMultipart)</code> method.
-     * <code>parent</code> may be <code>null</code> if the
-     * <code>MimeMultipart</code> is being removed from its containing
-     * <code>MimeBodyPart</code>.
-     * @since   JavaMail 1.1
-     */
-    void setParent(MimeBodyPart parent) {
-        this.parent = parent;
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimePartDataSource.java        1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.net.UnknownServiceException;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-/**
- * A utility class that implements a DataSource out of
- * a MimeBodyPart. This class is primarily meant for service providers.
- *
- * @author      John Mani
- */
-
-public final class MimePartDataSource implements DataSource {
-    private final MimeBodyPart part;
-
-    /**
-     * Constructor, that constructs a DataSource from a MimeBodyPart.
-     */
-    public MimePartDataSource(MimeBodyPart part) {
-        this.part = part;
-    }
-
-    /**
-     * Returns an input stream from this  MimeBodyPart. <p>
-     *
-     * This method applies the appropriate transfer-decoding, based
-     * on the Content-Transfer-Encoding attribute of this MimeBodyPart.
-     * Thus the returned input stream is a decoded stream of bytes.<p>
-     *
-     * This implementation obtains the raw content from the MimeBodyPart
-     * using the <code>getContentStream()</code> method and decodes
-     * it using the <code>MimeUtility.decode()</code> method.
-     *
-     * @return  decoded input stream
-     */
-    public InputStream getInputStream() throws IOException {
-
-        try {
-        InputStream is = part.getContentStream();
-
-            String encoding = part.getEncoding();
-            if (encoding != null)
-                return MimeUtility.decode(is, encoding);
-            else
-                return is;
-        } catch (MessagingException mex) {
-            throw new IOException(mex.getMessage());
-        }
-    }
-
-    /**
-     * DataSource method to return an output stream. <p>
-     *
-     * This implementation throws the UnknownServiceException.
-     */
-    public OutputStream getOutputStream() throws IOException {
-        throw new UnknownServiceException();
-    }
-
-    /**
-     * Returns the content-type of this DataSource. <p>
-     *
-     * This implementation just invokes the <code>getContentType</code>
-     * method on the MimeBodyPart.
-     */
-    public String getContentType() {
-        return part.getContentType();
-    }
-
-    /**
-     * DataSource method to return a name.  <p>
-     *
-     * This implementation just returns an empty string.
-     */
-    public String getName() {
-        try {
-                return part.getFileName();
-        } catch (MessagingException mex) {
-        return "";
-        }
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import javax.activation.DataSource;
-import javax.xml.soap.AttachmentPart;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- *
- * @author Kumar
- */
-public class MimePullMultipart  extends MimeMultipart {
-
-    private InputStream in = null;
-    private String boundary = null;
-    private MIMEMessage mm = null;
-    private DataSource dataSource = null;
-    private ContentType contType = null;
-    private String startParam = null;
-    private MIMEPart soapPart = null;
-
-    public MimePullMultipart(DataSource ds, ContentType ct)
-        throws MessagingException {
-        parsed = false;
-        if (ct==null)
-            contType = new ContentType(ds.getContentType());
-        else
-            contType = ct;
-
-        dataSource = ds;
-        boundary = contType.getParameter("boundary");
-    }
-
-    public  MIMEPart readAndReturnSOAPPart() throws  MessagingException {
-         if (soapPart != null) {
-            throw new MessagingException("Inputstream from datasource was already consumed");
-         }
-         readSOAPPart();
-         return soapPart;
-
-    }
-
-    protected  void readSOAPPart() throws  MessagingException {
-        try {
-            if (soapPart != null) {
-                return;
-            }
-            in = dataSource.getInputStream();
-            MIMEConfig config = new MIMEConfig(); //use defaults
-            mm = new MIMEMessage(in, boundary, config);
-            String st = contType.getParameter("start");
-            if(startParam == null) {
-                soapPart = mm.getPart(0);
-            } else {
-                  // Strip <...> from root part's Content-I
-                if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') {
-                    st = st.substring(1, st.length()-1);
-                }
-                startParam = st;
-                soapPart = mm.getPart(startParam);
-
-            }
-        } catch (IOException ex) {
-            throw new MessagingException("No inputstream from datasource", ex);
-        }
-    }
-
-    public void parseAll() throws MessagingException {
-        if (parsed) {
-            return;
-        }
-        if (soapPart == null) {
-            readSOAPPart();
-        }
-
-        List<MIMEPart> prts = mm.getAttachments();
-        for(MIMEPart part : prts) {
-            if (part != soapPart) {
-                new AttachmentPartImpl(part);
-                this.addBodyPart(new MimeBodyPart(part));
-            }
-       }
-       parsed = true;
-    }
-
-    protected  void parse() throws MessagingException {
-        parseAll();
-    }
-
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1507 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeUtility.java       1.45 03/03/10
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.util.*;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
-
-/**
- * This is a utility class that provides various MIME related
- * functionality. <p>
- *
- * There are a set of methods to encode and decode MIME headers as
- * per RFC 2047. A brief description on handling such headers is
- * given below: <p>
- *
- * RFC 822 mail headers <strong>must</strong> contain only US-ASCII
- * characters. Headers that contain non US-ASCII characters must be
- * encoded so that they contain only US-ASCII characters. Basically,
- * this process involves using either BASE64 or QP to encode certain
- * characters. RFC 2047 describes this in detail. <p>
- *
- * In Java, Strings contain (16 bit) Unicode characters. ASCII is a
- * subset of Unicode (and occupies the range 0 - 127). A String
- * that contains only ASCII characters is already mail-safe. If the
- * String contains non US-ASCII characters, it must be encoded. An
- * additional complexity in this step is that since Unicode is not
- * yet a widely used charset, one might want to first charset-encode
- * the String into another charset and then do the transfer-encoding.
- * <p>
- * Note that to get the actual bytes of a mail-safe String (say,
- * for sending over SMTP), one must do
- * <p><blockquote><pre>
- *
- *      byte[] bytes = string.getBytes("iso-8859-1");
- *
- * </pre></blockquote><p>
- *
- * The <code>setHeader</code> and <code>addHeader</code> methods
- * on MimeMessage and MimeBodyPart assume that the given header values
- * are Unicode strings that contain only US-ASCII characters. Hence
- * the callers of those methods must insure that the values they pass
- * do not contain non US-ASCII characters. The methods in this class
- * help do this. <p>
- *
- * The <code>getHeader</code> family of methods on MimeMessage and
- * MimeBodyPart return the raw header value. These might be encoded
- * as per RFC 2047, and if so, must be decoded into Unicode Strings.
- * The methods in this class help to do this. <p>
- *
- * Several System properties control strict conformance to the MIME
- * spec.  Note that these are not session properties but must be set
- * globally as System properties. <p>
- *
- * The <code>mail.mime.decodetext.strict</code> property controls
- * decoding of MIME encoded words.  The MIME spec requires that encoded
- * words start at the beginning of a whitespace separated word.  Some
- * mailers incorrectly include encoded words in the middle of a word.
- * If the <code>mail.mime.decodetext.strict</code> System property is
- * set to <code>"false"</code>, an attempt will be made to decode these
- * illegal encoded words. The default is true. <p>
- *
- * The <code>mail.mime.encodeeol.strict</code> property controls the
- * choice of Content-Transfer-Encoding for MIME parts that are not of
- * type "text".  Often such parts will contain textual data for which
- * an encoding that allows normal end of line conventions is appropriate.
- * In rare cases, such a part will appear to contain entirely textual
- * data, but will require an encoding that preserves CR and LF characters
- * without change.  If the <code>mail.mime.decodetext.strict</code>
- * System property is set to <code>"true"</code>, such an encoding will
- * be used when necessary.  The default is false. <p>
- *
- * In addition, the <code>mail.mime.charset</code> System property can
- * be used to specify the default MIME charset to use for encoded words
- * and text parts that don't otherwise specify a charset.  Normally, the
- * default MIME charset is derived from the default Java charset, as
- * specified in the <code>file.encoding</code> System property.  Most
- * applications will have no need to explicitly set the default MIME
- * charset.  In cases where the default MIME charset to be used for
- * mail messages is different than the charset used for files stored on
- * the system, this property should be set.
- *
- * @version 1.45, 03/03/10
- * @author  John Mani
- * @author  Bill Shannon
- */
-
-public class MimeUtility {
-
-    // This class cannot be instantiated
-    private MimeUtility() { }
-
-    public static final int ALL = -1;
-
-    private static final int BUFFER_SIZE = 1024;
-    private static boolean decodeStrict = true;
-    private static boolean encodeEolStrict = false;
-    private static boolean foldEncodedWords = false;
-    private static boolean foldText = true;
-
-    static {
-        try {
-            String s = SAAJUtil.getSystemProperty("mail.mime.decodetext.strict");
-            // default to true
-            decodeStrict = s == null || !s.equalsIgnoreCase("false");
-            s = SAAJUtil.getSystemProperty("mail.mime.encodeeol.strict");
-            // default to false
-            encodeEolStrict = s != null && s.equalsIgnoreCase("true");
-            s = SAAJUtil.getSystemProperty("mail.mime.foldencodedwords");
-            // default to false
-            foldEncodedWords = s != null && s.equalsIgnoreCase("true");
-            s = SAAJUtil.getSystemProperty("mail.mime.foldtext");
-            // default to true
-            foldText = s == null || !s.equalsIgnoreCase("false");
-        } catch (SecurityException sex) {
-            // ignore it
-        }
-    }
-
-
-    /**
-     * Get the content-transfer-encoding that should be applied
-     * to the input stream of this datasource, to make it mailsafe. <p>
-     *
-     * The algorithm used here is: <br>
-     * <ul>
-     * <li>
-     * If the primary type of this datasource is "text" and if all
-     * the bytes in its input stream are US-ASCII, then the encoding
-     * is "7bit". If more than half of the bytes are non-US-ASCII, then
-     * the encoding is "base64". If less than half of the bytes are
-     * non-US-ASCII, then the encoding is "quoted-printable".
-     * <li>
-     * If the primary type of this datasource is not "text", then if
-     * all the bytes of its input stream are US-ASCII, the encoding
-     * is "7bit". If there is even one non-US-ASCII character, the
-     * encoding is "base64".
-     * </ul>
-     *
-     * @param   ds      DataSource
-     * @return          the encoding. This is either "7bit",
-     *                  "quoted-printable" or "base64"
-     */
-    public static String getEncoding(DataSource ds) {
-        ContentType cType = null;
-        InputStream is = null;
-        String encoding = null;
-
-        try {
-            cType = new ContentType(ds.getContentType());
-            is = ds.getInputStream();
-        } catch (Exception ex) {
-            return "base64"; // what else ?!
-        }
-
-        boolean isText = cType.match("text/*");
-        // if not text, stop processing when we see non-ASCII
-        int i = checkAscii(is, ALL, !isText);
-        switch (i) {
-        case ALL_ASCII:
-            encoding = "7bit"; // all ascii
-            break;
-        case MOSTLY_ASCII:
-            encoding = "quoted-printable"; // mostly ascii
-            break;
-        default:
-            encoding = "base64"; // mostly binary
-            break;
-        }
-
-        // Close the input stream
-        try {
-            is.close();
-        } catch (IOException ioex) { }
-
-        return encoding;
-    }
-
-    /**
-     * Same as <code>getEncoding(DataSource)</code> except that instead
-     * of reading the data from an <code>InputStream</code> it uses the
-     * <code>writeTo</code> method to examine the data.  This is more
-     * efficient in the common case of a <code>DataHandler</code>
-     * created with an object and a MIME type (for example, a
-     * "text/plain" String) because all the I/O is done in this
-     * thread.  In the case requiring an <code>InputStream</code> the
-     * <code>DataHandler</code> uses a thread, a pair of pipe streams,
-     * and the <code>writeTo</code> method to produce the data. <p>
-     *
-     * @since   JavaMail 1.2
-     */
-    public static String getEncoding(DataHandler dh) {
-        ContentType cType = null;
-        String encoding = null;
-
-        /*
-         * Try to pick the most efficient means of determining the
-         * encoding.  If this DataHandler was created using a DataSource,
-         * the getEncoding(DataSource) method is typically faster.  If
-         * the DataHandler was created with an object, this method is
-         * much faster.  To distinguish the two cases, we use a heuristic.
-         * A DataHandler created with an object will always have a null name.
-         * A DataHandler created with a DataSource will usually have a
-         * non-null name.
-         *
-         * XXX - This is actually quite a disgusting hack, but it makes
-         *       a common case run over twice as fast.
-         */
-        if (dh.getName() != null)
-            return getEncoding(dh.getDataSource());
-
-        try {
-            cType = new ContentType(dh.getContentType());
-        } catch (Exception ex) {
-            return "base64"; // what else ?!
-        }
-
-        if (cType.match("text/*")) {
-            // Check all of the available bytes
-            AsciiOutputStream aos = new AsciiOutputStream(false, false);
-            try {
-                dh.writeTo(aos);
-            } catch (IOException ex) { }        // ignore it
-            switch (aos.getAscii()) {
-            case ALL_ASCII:
-                encoding = "7bit"; // all ascii
-                break;
-            case MOSTLY_ASCII:
-                encoding = "quoted-printable"; // mostly ascii
-                break;
-            default:
-                encoding = "base64"; // mostly binary
-                break;
-            }
-        } else { // not "text"
-            // Check all of available bytes, break out if we find
-            // at least one non-US-ASCII character
-            AsciiOutputStream aos =
-                        new AsciiOutputStream(true, encodeEolStrict);
-            try {
-                dh.writeTo(aos);
-            } catch (IOException ex) { }        // ignore it
-            if (aos.getAscii() == ALL_ASCII) // all ascii
-                encoding = "7bit";
-            else // found atleast one non-ascii character, use b64
-                encoding = "base64";
-        }
-
-        return encoding;
-    }
-
-    /**
-     * Decode the given input stream. The Input stream returned is
-     * the decoded input stream. All the encodings defined in RFC 2045
-     * are supported here. They include "base64", "quoted-printable",
-     * "7bit", "8bit", and "binary". In addition, "uuencode" is also
-     * supported.
-     *
-     * @param   is              input stream
-     * @param   encoding        the encoding of the stream.
-     * @return                  decoded input stream.
-     */
-    public static InputStream decode(InputStream is, String encoding)
-                throws MessagingException {
-        if (encoding.equalsIgnoreCase("base64"))
-            return new BASE64DecoderStream(is);
-        else if (encoding.equalsIgnoreCase("quoted-printable"))
-            return new QPDecoderStream(is);
-        else if (encoding.equalsIgnoreCase("uuencode") ||
-                 encoding.equalsIgnoreCase("x-uuencode") ||
-                 encoding.equalsIgnoreCase("x-uue"))
-            return new UUDecoderStream(is);
-        else if (encoding.equalsIgnoreCase("binary") ||
-                 encoding.equalsIgnoreCase("7bit") ||
-                 encoding.equalsIgnoreCase("8bit"))
-            return is;
-        else
-            throw new MessagingException("Unknown encoding: " + encoding);
-    }
-
-    /**
-     * Wrap an encoder around the given output stream.
-     * All the encodings defined in RFC 2045 are supported here.
-     * They include "base64", "quoted-printable", "7bit", "8bit" and
-     * "binary". In addition, "uuencode" is also supported.
-     *
-     * @param   os              output stream
-     * @param   encoding        the encoding of the stream.
-     * @return                  output stream that applies the
-     *                          specified encoding.
-     */
-    public static OutputStream encode(OutputStream os, String encoding)
-                throws MessagingException {
-        if (encoding == null)
-            return os;
-        else if (encoding.equalsIgnoreCase("base64"))
-            return new BASE64EncoderStream(os);
-        else if (encoding.equalsIgnoreCase("quoted-printable"))
-            return new QPEncoderStream(os);
-        else if (encoding.equalsIgnoreCase("uuencode") ||
-                 encoding.equalsIgnoreCase("x-uuencode") ||
-                 encoding.equalsIgnoreCase("x-uue"))
-            return new UUEncoderStream(os);
-        else if (encoding.equalsIgnoreCase("binary") ||
-                 encoding.equalsIgnoreCase("7bit") ||
-                 encoding.equalsIgnoreCase("8bit"))
-            return os;
-        else
-            throw new MessagingException("Unknown encoding: " +encoding);
-    }
-
-    /**
-     * Wrap an encoder around the given output stream.
-     * All the encodings defined in RFC 2045 are supported here.
-     * They include "base64", "quoted-printable", "7bit", "8bit" and
-     * "binary". In addition, "uuencode" is also supported.
-     * The <code>filename</code> parameter is used with the "uuencode"
-     * encoding and is included in the encoded output.
-     *
-     * @param   os              output stream
-     * @param   encoding        the encoding of the stream.
-     * @param   filename        name for the file being encoded (only used
-     *                          with uuencode)
-     * @return                  output stream that applies the
-     *                          specified encoding.
-     * @since                   JavaMail 1.2
-     */
-    public static OutputStream encode(OutputStream os, String encoding,
-                                      String filename)
-                throws MessagingException {
-        if (encoding == null)
-            return os;
-        else if (encoding.equalsIgnoreCase("base64"))
-            return new BASE64EncoderStream(os);
-        else if (encoding.equalsIgnoreCase("quoted-printable"))
-            return new QPEncoderStream(os);
-        else if (encoding.equalsIgnoreCase("uuencode") ||
-                 encoding.equalsIgnoreCase("x-uuencode") ||
-                 encoding.equalsIgnoreCase("x-uue"))
-            return new UUEncoderStream(os, filename);
-        else if (encoding.equalsIgnoreCase("binary") ||
-                 encoding.equalsIgnoreCase("7bit") ||
-                 encoding.equalsIgnoreCase("8bit"))
-            return os;
-        else
-            throw new MessagingException("Unknown encoding: " +encoding);
-    }
-
-    /**
-     * Encode a RFC 822 "text" token into mail-safe form as per
-     * RFC 2047. <p>
-     *
-     * The given Unicode string is examined for non US-ASCII
-     * characters. If the string contains only US-ASCII characters,
-     * it is returned as-is.  If the string contains non US-ASCII
-     * characters, it is first character-encoded using the platform's
-     * default charset, then transfer-encoded using either the B or
-     * Q encoding. The resulting bytes are then returned as a Unicode
-     * string containing only ASCII  characters. <p>
-     *
-     * Note that this method should be used to encode only
-     * "unstructured" RFC 822 headers. <p>
-     *
-     * Example of usage:
-     * <p><blockquote><pre>
-     *
-     *  MimeBodyPart part = ...
-     *  String rawvalue = "FooBar Mailer, Japanese version 1.1"
-     *  try {
-     *    // If we know for sure that rawvalue contains only US-ASCII
-     *    // characters, we can skip the encoding part
-     *    part.setHeader("X-mailer", MimeUtility.encodeText(rawvalue));
-     *  } catch (UnsupportedEncodingException e) {
-     *    // encoding failure
-     *  } catch (MessagingException me) {
-     *   // setHeader() failure
-     *  }
-     *
-     * </pre></blockquote><p>
-     *
-     * @param   text    unicode string
-     * @return  Unicode string containing only US-ASCII characters
-     * @exception UnsupportedEncodingException if the encoding fails
-     */
-    public static String encodeText(String text)
-                        throws UnsupportedEncodingException {
-        return encodeText(text, null, null);
-    }
-
-    /**
-     * Encode a RFC 822 "text" token into mail-safe form as per
-     * RFC 2047. <p>
-     *
-     * The given Unicode string is examined for non US-ASCII
-     * characters. If the string contains only US-ASCII characters,
-     * it is returned as-is.  If the string contains non US-ASCII
-     * characters, it is first character-encoded using the specified
-     * charset, then transfer-encoded using either the B or Q encoding.
-     * The resulting bytes are then returned as a Unicode string
-     * containing only ASCII characters. <p>
-     *
-     * Note that this method should be used to encode only
-     * "unstructured" RFC 822 headers.
-     *
-     * @param   text    the header value
-     * @param   charset the charset. If this parameter is null, the
-     *          platform's default chatset is used.
-     * @param   encoding the encoding to be used. Currently supported
-     *          values are "B" and "Q". If this parameter is null, then
-     *          the "Q" encoding is used if most of characters to be
-     *          encoded are in the ASCII charset, otherwise "B" encoding
-     *          is used.
-     * @return  Unicode string containing only US-ASCII characters
-     */
-    public static String encodeText(String text, String charset,
-                                    String encoding)
-                        throws UnsupportedEncodingException {
-        return encodeWord(text, charset, encoding, false);
-    }
-
-    /**
-     * Decode "unstructured" headers, that is, headers that are defined
-     * as '*text' as per RFC 822. <p>
-     *
-     * The string is decoded using the algorithm specified in
-     * RFC 2047, Section 6.1.1. If the charset-conversion fails
-     * for any sequence, an UnsupportedEncodingException is thrown.
-     * If the String is not an RFC 2047 style encoded header, it is
-     * returned as-is <p>
-     *
-     * Example of usage:
-     * <p><blockquote><pre>
-     *
-     *  MimeBodyPart part = ...
-     *  String rawvalue = null;
-     *  String  value = null;
-     *  try {
-     *    if ((rawvalue = part.getHeader("X-mailer")[0]) != null)
-     *      value = MimeUtility.decodeText(rawvalue);
-     *  } catch (UnsupportedEncodingException e) {
-     *      // Don't care
-     *      value = rawvalue;
-     *  } catch (MessagingException me) { }
-     *
-     *  return value;
-     *
-     * </pre></blockquote><p>
-     *
-     * @param   etext   the possibly encoded value
-     * @exception       UnsupportedEncodingException if the charset
-     *                  conversion failed.
-     */
-    public static String decodeText(String etext)
-                throws UnsupportedEncodingException {
-        /*
-         * We look for sequences separated by "linear-white-space".
-         * (as per RFC 2047, Section 6.1.1)
-         * RFC 822 defines "linear-white-space" as SPACE | HT | CR | NL.
-         */
-        String lwsp = " \t\n\r";
-        StringTokenizer st;
-
-        /*
-         * First, lets do a quick run thru the string and check
-         * whether the sequence "=?"  exists at all. If none exists,
-         * we know there are no encoded-words in here and we can just
-         * return the string as-is, without suffering thru the later
-         * decoding logic.
-         * This handles the most common case of unencoded headers
-         * efficiently.
-         */
-        if (etext.indexOf("=?") == -1)
-            return etext;
-
-        // Encoded words found. Start decoding ...
-
-        st = new StringTokenizer(etext, lwsp, true);
-        StringBuffer sb = new StringBuffer();  // decode buffer
-        StringBuffer wsb = new StringBuffer(); // white space buffer
-        boolean prevWasEncoded = false;
-
-        while (st.hasMoreTokens()) {
-            char c;
-            String s = st.nextToken();
-            // If whitespace, append it to the whitespace buffer
-            if (((c = s.charAt(0)) == ' ') || (c == '\t') ||
-                (c == '\r') || (c == '\n'))
-                wsb.append(c);
-            else {
-                // Check if token is an 'encoded-word' ..
-                String word;
-                try {
-                    word = decodeWord(s);
-                    // Yes, this IS an 'encoded-word'.
-                    if (!prevWasEncoded && wsb.length() > 0) {
-                        // if the previous word was also encoded, we
-                        // should ignore the collected whitespace. Else
-                        // we include the whitespace as well.
-                        sb.append(wsb);
-                    }
-                    prevWasEncoded = true;
-                } catch (ParseException pex) {
-                    // This is NOT an 'encoded-word'.
-                    word = s;
-                    // possibly decode inner encoded words
-                    if (!decodeStrict)
-                        word = decodeInnerWords(word);
-                    // include colleced whitespace ..
-                    if (wsb.length() > 0)
-                        sb.append(wsb);
-                    prevWasEncoded = false;
-                }
-                sb.append(word); // append the actual word
-                wsb.setLength(0); // reset wsb for reuse
-            }
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Encode a RFC 822 "word" token into mail-safe form as per
-     * RFC 2047. <p>
-     *
-     * The given Unicode string is examined for non US-ASCII
-     * characters. If the string contains only US-ASCII characters,
-     * it is returned as-is.  If the string contains non US-ASCII
-     * characters, it is first character-encoded using the platform's
-     * default charset, then transfer-encoded using either the B or
-     * Q encoding. The resulting bytes are then returned as a Unicode
-     * string containing only ASCII  characters. <p>
-     *
-     * This method is meant to be used when creating RFC 822 "phrases".
-     * The InternetAddress class, for example, uses this to encode
-     * it's 'phrase' component.
-     *
-     * @param   text    unicode string
-     * @return  Array of Unicode strings containing only US-ASCII
-     *          characters.
-     * @exception UnsupportedEncodingException if the encoding fails
-     */
-    public static String encodeWord(String word)
-                        throws UnsupportedEncodingException {
-        return encodeWord(word, null, null);
-    }
-
-    /**
-     * Encode a RFC 822 "word" token into mail-safe form as per
-     * RFC 2047. <p>
-     *
-     * The given Unicode string is examined for non US-ASCII
-     * characters. If the string contains only US-ASCII characters,
-     * it is returned as-is.  If the string contains non US-ASCII
-     * characters, it is first character-encoded using the specified
-     * charset, then transfer-encoded using either the B or Q encoding.
-     * The resulting bytes are then returned as a Unicode string
-     * containing only ASCII characters. <p>
-     *
-     * @param   text    unicode string
-     * @param   charset the MIME charset
-     * @param   encoding the encoding to be used. Currently supported
-     *          values are "B" and "Q". If this parameter is null, then
-     *          the "Q" encoding is used if most of characters to be
-     *          encoded are in the ASCII charset, otherwise "B" encoding
-     *          is used.
-     * @return  Unicode string containing only US-ASCII characters
-     * @exception UnsupportedEncodingException if the encoding fails
-     */
-    public static String encodeWord(String word, String charset,
-                                    String encoding)
-                        throws UnsupportedEncodingException {
-        return encodeWord(word, charset, encoding, true);
-    }
-
-    /*
-     * Encode the given string. The parameter 'encodingWord' should
-     * be true if a RFC 822 "word" token is being encoded and false if a
-     * RFC 822 "text" token is being encoded. This is because the
-     * "Q" encoding defined in RFC 2047 has more restrictions when
-     * encoding "word" tokens. (Sigh)
-     */
-    private static String encodeWord(String string, String charset,
-                                     String encoding, boolean encodingWord)
-                        throws UnsupportedEncodingException {
-
-        // If 'string' contains only US-ASCII characters, just
-        // return it.
-        int ascii = checkAscii(string);
-        if (ascii == ALL_ASCII)
-            return string;
-
-        // Else, apply the specified charset conversion.
-        String jcharset;
-        if (charset == null) { // use default charset
-            jcharset = getDefaultJavaCharset(); // the java charset
-            charset = getDefaultMIMECharset(); // the MIME equivalent
-        } else // MIME charset -> java charset
-            jcharset = javaCharset(charset);
-
-        // If no transfer-encoding is specified, figure one out.
-        if (encoding == null) {
-            if (ascii != MOSTLY_NONASCII)
-                encoding = "Q";
-            else
-                encoding = "B";
-        }
-
-        boolean b64;
-        if (encoding.equalsIgnoreCase("B"))
-            b64 = true;
-        else if (encoding.equalsIgnoreCase("Q"))
-            b64 = false;
-        else
-            throw new UnsupportedEncodingException(
-                        "Unknown transfer encoding: " + encoding);
-
-        StringBuffer outb = new StringBuffer(); // the output buffer
-        doEncode(string, b64, jcharset,
-                 // As per RFC 2047, size of an encoded string should not
-                 // exceed 75 bytes.
-                 // 7 = size of "=?", '?', 'B'/'Q', '?', "?="
-                 75 - 7 - charset.length(), // the available space
-                 "=?" + charset + "?" + encoding + "?", // prefix
-                 true, encodingWord, outb);
-
-        return outb.toString();
-    }
-
-    private static void doEncode(String string, boolean b64,
-                String jcharset, int avail, String prefix,
-                boolean first, boolean encodingWord, StringBuffer buf)
-                        throws UnsupportedEncodingException {
-
-        // First find out what the length of the encoded version of
-        // 'string' would be.
-        byte[] bytes = string.getBytes(jcharset);
-        int len;
-        if (b64) // "B" encoding
-            len = BEncoderStream.encodedLength(bytes);
-        else // "Q"
-            len = QEncoderStream.encodedLength(bytes, encodingWord);
-
-        int size;
-        if ((len > avail) && ((size = string.length()) > 1)) {
-            // If the length is greater than 'avail', split 'string'
-            // into two and recurse.
-            doEncode(string.substring(0, size/2), b64, jcharset,
-                     avail, prefix, first, encodingWord, buf);
-            doEncode(string.substring(size/2, size), b64, jcharset,
-                     avail, prefix, false, encodingWord, buf);
-        } else {
-            // length <= than 'avail'. Encode the given string
-            ByteArrayOutputStream os = new ByteArrayOutputStream(BUFFER_SIZE);
-            OutputStream eos; // the encoder
-            if (b64) // "B" encoding
-                eos = new BEncoderStream(os);
-            else // "Q" encoding
-                eos = new QEncoderStream(os, encodingWord);
-
-            try { // do the encoding
-                eos.write(bytes);
-                eos.close();
-            } catch (IOException ioex) { }
-
-            byte[] encodedBytes = os.toByteArray(); // the encoded stuff
-            // Now write out the encoded (all ASCII) bytes into our
-            // StringBuffer
-            if (!first) // not the first line of this sequence
-                if (foldEncodedWords)
-                    buf.append("\r\n "); // start a continuation line
-                else
-                    buf.append(" "); // line will be folded later
-
-            buf.append(prefix);
-            for (int i = 0; i < encodedBytes.length; i++)
-                buf.append((char)encodedBytes[i]);
-            buf.append("?="); // terminate the current sequence
-        }
-    }
-
-    /**
-     * The string is parsed using the rules in RFC 2047 for parsing
-     * an "encoded-word". If the parse fails, a ParseException is
-     * thrown. Otherwise, it is transfer-decoded, and then
-     * charset-converted into Unicode. If the charset-conversion
-     * fails, an UnsupportedEncodingException is thrown.<p>
-     *
-     * @param   eword   the possibly encoded value
-     * @exception       ParseException if the string is not an
-     *                  encoded-word as per RFC 2047.
-     * @exception       UnsupportedEncodingException if the charset
-     *                  conversion failed.
-     */
-    public static String decodeWord(String eword)
-                throws ParseException, UnsupportedEncodingException {
-
-        if (!eword.startsWith("=?")) // not an encoded word
-            throw new ParseException();
-
-        // get charset
-        int start = 2; int pos;
-        if ((pos = eword.indexOf('?', start)) == -1)
-            throw new ParseException();
-        String charset = javaCharset(eword.substring(start, pos));
-
-        // get encoding
-        start = pos+1;
-        if ((pos = eword.indexOf('?', start)) == -1)
-            throw new ParseException();
-        String encoding = eword.substring(start, pos);
-
-        // get encoded-sequence
-        start = pos+1;
-        if ((pos = eword.indexOf("?=", start)) == -1)
-            throw new ParseException();
-        String word = eword.substring(start, pos);
-
-        try {
-            // Extract the bytes from word
-            ByteArrayInputStream bis =
-                new ByteArrayInputStream(ASCIIUtility.getBytes(word));
-
-            // Get the appropriate decoder
-            InputStream is;
-            if (encoding.equalsIgnoreCase("B"))
-                is = new BASE64DecoderStream(bis);
-            else if (encoding.equalsIgnoreCase("Q"))
-                is = new QDecoderStream(bis);
-            else
-                throw new UnsupportedEncodingException(
-                                "unknown encoding: " + encoding);
-
-            // For b64 & q, size of decoded word <= size of word. So
-            // the decoded bytes must fit into the 'bytes' array. This
-            // is certainly more efficient than writing bytes into a
-            // ByteArrayOutputStream and then pulling out the byte[]
-            // from it.
-            int count = bis.available();
-            byte[] bytes = new byte[count];
-            // count is set to the actual number of decoded bytes
-            count = is.read(bytes, 0, count);
-
-            // Finally, convert the decoded bytes into a String using
-            // the specified charset
-            String s = new String(bytes, 0, count, charset);
-            if (pos + 2 < eword.length()) {
-                // there's still more text in the string
-                String rest = eword.substring(pos + 2);
-                if (!decodeStrict)
-                    rest = decodeInnerWords(rest);
-                s += rest;
-            }
-            return s;
-        } catch (UnsupportedEncodingException uex) {
-            // explicitly catch and rethrow this exception, otherwise
-            // the below IOException catch will swallow this up!
-            throw uex;
-        } catch (IOException ioex) {
-            // Shouldn't happen.
-            throw new ParseException();
-        } catch (IllegalArgumentException iex) {
-            /* An unknown charset of the form ISO-XXX-XXX, will cause
-             * the JDK to throw an IllegalArgumentException ... Since the
-             * JDK will attempt to create a classname using this string,
-             * but valid classnames must not contain the character '-',
-             * and this results in an IllegalArgumentException, rather than
-             * the expected UnsupportedEncodingException. Yikes
-             */
-            throw new UnsupportedEncodingException();
-        }
-    }
-
-    /**
-     * Look for encoded words within a word.  The MIME spec doesn't
-     * allow this, but many broken mailers, especially Japanese mailers,
-     * produce such incorrect encodings.
-     */
-    private static String decodeInnerWords(String word)
-                                throws UnsupportedEncodingException {
-        int start = 0, i;
-        StringBuffer buf = new StringBuffer();
-        while ((i = word.indexOf("=?", start)) >= 0) {
-            buf.append(word.substring(start, i));
-            int end = word.indexOf("?=", i);
-            if (end < 0)
-                break;
-            String s = word.substring(i, end + 2);
-            try {
-                s = decodeWord(s);
-            } catch (ParseException pex) {
-                // ignore it, just use the original string
-            }
-            buf.append(s);
-            start = end + 2;
-        }
-        if (start == 0)
-            return word;
-        if (start < word.length())
-            buf.append(word.substring(start));
-        return buf.toString();
-    }
-
-    /**
-     * A utility method to quote a word, if the word contains any
-     * characters from the specified 'specials' list.<p>
-     *
-     * The <code>HeaderTokenizer</code> class defines two special
-     * sets of delimiters - MIME and RFC 822. <p>
-     *
-     * This method is typically used during the generation of
-     * RFC 822 and MIME header fields.
-     *
-     * @param   word    word to be quoted
-     * @param   specials the set of special characters
-     * @return          the possibly quoted word
-     * @see     javax.mail.internet.HeaderTokenizer#MIME
-     * @see     javax.mail.internet.HeaderTokenizer#RFC822
-     */
-    public static String quote(String word, String specials) {
-        int len = word.length();
-
-        /*
-         * Look for any "bad" characters, Escape and
-         *  quote the entire string if necessary.
-         */
-        boolean needQuoting = false;
-        for (int i = 0; i < len; i++) {
-            char c = word.charAt(i);
-            if (c == '"' || c == '\\' || c == '\r' || c == '\n') {
-                // need to escape them and then quote the whole string
-                StringBuffer sb = new StringBuffer(len + 3);
-                sb.append('"');
-                sb.append(word.substring(0, i));
-                int lastc = 0;
-                for (int j = i; j < len; j++) {
-                    char cc = word.charAt(j);
-                    if ((cc == '"') || (cc == '\\') ||
-                        (cc == '\r') || (cc == '\n'))
-                        if (cc == '\n' && lastc == '\r')
-                            ;   // do nothing, CR was already escaped
-                        else
-                            sb.append('\\');    // Escape the character
-                    sb.append(cc);
-                    lastc = cc;
-                }
-                sb.append('"');
-                return sb.toString();
-            } else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
-                // These characters cause the string to be quoted
-                needQuoting = true;
-        }
-
-        if (needQuoting) {
-            StringBuffer sb = new StringBuffer(len + 2);
-            sb.append('"').append(word).append('"');
-            return sb.toString();
-        } else
-            return word;
-    }
-
-    /**
-     * Fold a string at linear whitespace so that each line is no longer
-     * than 76 characters, if possible.  If there are more than 76
-     * non-whitespace characters consecutively, the string is folded at
-     * the first whitespace after that sequence.  The parameter
-     * <code>used</code> indicates how many characters have been used in
-     * the current line; it is usually the length of the header name. <p>
-     *
-     * Note that line breaks in the string aren't escaped; they probably
-     * should be.
-     *
-     * @param   used    characters used in line so far
-     * @param   s       the string to fold
-     * @return          the folded string
-     */
-    /*public*/ static String fold(int used, String s) {
-        if (!foldText)
-            return s;
-
-        int end;
-        char c;
-        // Strip trailing spaces
-        for (end = s.length() - 1; end >= 0; end--) {
-            c = s.charAt(end);
-            if (c != ' ' && c != '\t')
-                break;
-        }
-        if (end != s.length() - 1)
-            s = s.substring(0, end + 1);
-
-        // if the string fits now, just return it
-        if (used + s.length() <= 76)
-            return s;
-
-        // have to actually fold the string
-        StringBuffer sb = new StringBuffer(s.length() + 4);
-        char lastc = 0;
-        while (used + s.length() > 76) {
-            int lastspace = -1;
-            for (int i = 0; i < s.length(); i++) {
-                if (lastspace != -1 && used + i > 76)
-                    break;
-                c = s.charAt(i);
-                if (c == ' ' || c == '\t')
-                    if (!(lastc == ' ' || lastc == '\t'))
-                        lastspace = i;
-                lastc = c;
-            }
-            if (lastspace == -1) {
-                // no space, use the whole thing
-                sb.append(s);
-                s = "";
-                used = 0;
-                break;
-            }
-            sb.append(s.substring(0, lastspace));
-            sb.append("\r\n");
-            lastc = s.charAt(lastspace);
-            sb.append(lastc);
-            s = s.substring(lastspace + 1);
-            used = 1;
-        }
-        sb.append(s);
-        return sb.toString();
-    }
-
-    /**
-     * Unfold a folded header.  Any line breaks that aren't escaped and
-     * are followed by whitespace are removed.
-     *
-     * @param   s       the string to unfold
-     * @return          the unfolded string
-     */
-    /*public*/ static String unfold(String s) {
-        if (!foldText)
-            return s;
-
-        StringBuffer sb = null;
-        int i;
-        while ((i = indexOfAny(s, "\r\n")) >= 0) {
-            int start = i;
-            int l = s.length();
-            i++;                // skip CR or NL
-            if (i < l && s.charAt(i - 1) == '\r' && s.charAt(i) == '\n')
-                i++;    // skip LF
-            if (start == 0 || s.charAt(start - 1) != '\\') {
-                char c;
-                // if next line starts with whitespace, skip all of it
-                // XXX - always has to be true?
-                if (i < l && ((c = s.charAt(i)) == ' ' || c == '\t')) {
-                    i++;        // skip whitespace
-                    while (i < l && ((c = s.charAt(i)) == ' ' || c == '\t'))
-                        i++;
-                    if (sb == null)
-                        sb = new StringBuffer(s.length());
-                    if (start != 0) {
-                        sb.append(s.substring(0, start));
-                        sb.append(' ');
-                    }
-                    s = s.substring(i);
-                    continue;
-                }
-                // it's not a continuation line, just leave it in
-                if (sb == null)
-                    sb = new StringBuffer(s.length());
-                sb.append(s.substring(0, i));
-                s = s.substring(i);
-            } else {
-                // there's a backslash at "start - 1"
-                // strip it out, but leave in the line break
-                if (sb == null)
-                    sb = new StringBuffer(s.length());
-                sb.append(s.substring(0, start - 1));
-                sb.append(s.substring(start, i));
-                s = s.substring(i);
-            }
-        }
-        if (sb != null) {
-            sb.append(s);
-            return sb.toString();
-        } else
-            return s;
-    }
-
-    /**
-     * Return the first index of any of the characters in "any" in "s",
-     * or -1 if none are found.
-     *
-     * This should be a method on String.
-     */
-    private static int indexOfAny(String s, String any) {
-        return indexOfAny(s, any, 0);
-    }
-
-    private static int indexOfAny(String s, String any, int start) {
-        try {
-            int len = s.length();
-            for (int i = start; i < len; i++) {
-                if (any.indexOf(s.charAt(i)) >= 0)
-                    return i;
-            }
-            return -1;
-        } catch (StringIndexOutOfBoundsException e) {
-            return -1;
-        }
-    }
-
-    /**
-     * Convert a MIME charset name into a valid Java charset name. <p>
-     *
-     * @param charset   the MIME charset name
-     * @return  the Java charset equivalent. If a suitable mapping is
-     *          not available, the passed in charset is itself returned.
-     */
-    public static String javaCharset(String charset) {
-        if (mime2java == null || charset == null)
-            // no mapping table, or charset parameter is null
-            return charset;
-
-        String alias = (String)mime2java.get(charset.toLowerCase());
-        return alias == null ? charset : alias;
-    }
-
-    /**
-     * Convert a java charset into its MIME charset name. <p>
-     *
-     * Note that a future version of JDK (post 1.2) might provide
-     * this functionality, in which case, we may deprecate this
-     * method then.
-     *
-     * @param   charset    the JDK charset
-     * @return          the MIME/IANA equivalent. If a mapping
-     *                  is not possible, the passed in charset itself
-     *                  is returned.
-     * @since           JavaMail 1.1
-     */
-    public static String mimeCharset(String charset) {
-        if (java2mime == null || charset == null)
-            // no mapping table or charset param is null
-            return charset;
-
-        String alias = (String)java2mime.get(charset.toLowerCase());
-        return alias == null ? charset : alias;
-    }
-
-    private static String defaultJavaCharset;
-    private static String defaultMIMECharset;
-
-    /**
-     * Get the default charset corresponding to the system's current
-     * default locale.  If the System property <code>mail.mime.charset</code>
-     * is set, a system charset corresponding to this MIME charset will be
-     * returned. <p>
-     *
-     * @return  the default charset of the system's default locale,
-     *          as a Java charset. (NOT a MIME charset)
-     * @since   JavaMail 1.1
-     */
-    public static String getDefaultJavaCharset() {
-        if (defaultJavaCharset == null) {
-            /*
-             * If mail.mime.charset is set, it controls the default
-             * Java charset as well.
-             */
-            String mimecs = null;
-
-            mimecs = SAAJUtil.getSystemProperty("mail.mime.charset");
-
-            if (mimecs != null && mimecs.length() > 0) {
-                defaultJavaCharset = javaCharset(mimecs);
-                return defaultJavaCharset;
-            }
-
-            try {
-                defaultJavaCharset = System.getProperty("file.encoding",
-                                                        "8859_1");
-            } catch (SecurityException sex) {
-
-                class NullInputStream extends InputStream {
-                    public int read() {
-                        return 0;
-                    }
-                }
-                InputStreamReader reader =
-                        new InputStreamReader(new NullInputStream());
-                defaultJavaCharset = reader.getEncoding();
-                if (defaultJavaCharset == null)
-                    defaultJavaCharset = "8859_1";
-            }
-        }
-
-        return defaultJavaCharset;
-    }
-
-    /*
-     * Get the default MIME charset for this locale.
-     */
-    static String getDefaultMIMECharset() {
-        if (defaultMIMECharset == null) {
-                defaultMIMECharset = SAAJUtil.getSystemProperty("mail.mime.charset");
-        }
-        if (defaultMIMECharset == null)
-            defaultMIMECharset = mimeCharset(getDefaultJavaCharset());
-        return defaultMIMECharset;
-    }
-
-    // Tables to map MIME charset names to Java names and vice versa.
-    // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset
-    private static Hashtable mime2java;
-    private static Hashtable java2mime;
-
-    static {
-        java2mime = new Hashtable(40);
-        mime2java = new Hashtable(10);
-
-        try {
-            // Use this class's classloader to load the mapping file
-            // XXX - we should use SecuritySupport, but it's in another package
-            InputStream is =
-                    com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility.class.getResourceAsStream(
-                    "/META-INF/javamail.charset.map");
-
-            if (is != null) {
-                is = new LineInputStream(is);
-
-                // Load the JDK-to-MIME charset mapping table
-                loadMappings((LineInputStream)is, java2mime);
-
-                // Load the MIME-to-JDK charset mapping table
-                loadMappings((LineInputStream)is, mime2java);
-            }
-        } catch (Exception ex) { }
-
-        // If we didn't load the tables, e.g., because we didn't have
-        // permission, load them manually.  The entries here should be
-        // the same as the default javamail.charset.map.
-        if (java2mime.isEmpty()) {
-            java2mime.put("8859_1", "ISO-8859-1");
-            java2mime.put("iso8859_1", "ISO-8859-1");
-            java2mime.put("ISO8859-1", "ISO-8859-1");
-
-            java2mime.put("8859_2", "ISO-8859-2");
-            java2mime.put("iso8859_2", "ISO-8859-2");
-            java2mime.put("ISO8859-2", "ISO-8859-2");
-
-            java2mime.put("8859_3", "ISO-8859-3");
-            java2mime.put("iso8859_3", "ISO-8859-3");
-            java2mime.put("ISO8859-3", "ISO-8859-3");
-
-            java2mime.put("8859_4", "ISO-8859-4");
-            java2mime.put("iso8859_4", "ISO-8859-4");
-            java2mime.put("ISO8859-4", "ISO-8859-4");
-
-            java2mime.put("8859_5", "ISO-8859-5");
-            java2mime.put("iso8859_5", "ISO-8859-5");
-            java2mime.put("ISO8859-5", "ISO-8859-5");
-
-            java2mime.put("8859_6", "ISO-8859-6");
-            java2mime.put("iso8859_6", "ISO-8859-6");
-            java2mime.put("ISO8859-6", "ISO-8859-6");
-
-            java2mime.put("8859_7", "ISO-8859-7");
-            java2mime.put("iso8859_7", "ISO-8859-7");
-            java2mime.put("ISO8859-7", "ISO-8859-7");
-
-            java2mime.put("8859_8", "ISO-8859-8");
-            java2mime.put("iso8859_8", "ISO-8859-8");
-            java2mime.put("ISO8859-8", "ISO-8859-8");
-
-            java2mime.put("8859_9", "ISO-8859-9");
-            java2mime.put("iso8859_9", "ISO-8859-9");
-            java2mime.put("ISO8859-9", "ISO-8859-9");
-
-            java2mime.put("SJIS", "Shift_JIS");
-            java2mime.put("MS932", "Shift_JIS");
-            java2mime.put("JIS", "ISO-2022-JP");
-            java2mime.put("ISO2022JP", "ISO-2022-JP");
-            java2mime.put("EUC_JP", "euc-jp");
-            java2mime.put("KOI8_R", "koi8-r");
-            java2mime.put("EUC_CN", "euc-cn");
-            java2mime.put("EUC_TW", "euc-tw");
-            java2mime.put("EUC_KR", "euc-kr");
-        }
-        if (mime2java.isEmpty()) {
-            mime2java.put("iso-2022-cn", "ISO2022CN");
-            mime2java.put("iso-2022-kr", "ISO2022KR");
-            mime2java.put("utf-8", "UTF8");
-            mime2java.put("utf8", "UTF8");
-            mime2java.put("ja_jp.iso2022-7", "ISO2022JP");
-            mime2java.put("ja_jp.eucjp", "EUCJIS");
-            mime2java.put("euc-kr", "KSC5601");
-            mime2java.put("euckr", "KSC5601");
-            mime2java.put("us-ascii", "ISO-8859-1");
-            mime2java.put("x-us-ascii", "ISO-8859-1");
-        }
-    }
-
-    private static void loadMappings(LineInputStream is, Hashtable table) {
-        String currLine;
-
-        while (true) {
-            try {
-                currLine = is.readLine();
-            } catch (IOException ioex) {
-                break; // error in reading, stop
-            }
-
-            if (currLine == null) // end of file, stop
-                break;
-            if (currLine.startsWith("--") && currLine.endsWith("--"))
-                // end of this table
-                break;
-
-            // ignore empty lines and comments
-            if (currLine.trim().length() == 0 || currLine.startsWith("#"))
-                continue;
-
-            // A valid entry is of the form <key><separator><value>
-            // where, <separator> := SPACE | HT. Parse this
-            StringTokenizer tk = new StringTokenizer(currLine, " \t");
-            try {
-                String key = tk.nextToken();
-                String value = tk.nextToken();
-                table.put(key.toLowerCase(), value);
-            } catch (NoSuchElementException nex) { }
-        }
-    }
-
-    static final int ALL_ASCII          = 1;
-    static final int MOSTLY_ASCII       = 2;
-    static final int MOSTLY_NONASCII    = 3;
-
-    /**
-     * Check if the given string contains non US-ASCII characters.
-     * @param   s       string
-     * @return          ALL_ASCII if all characters in the string
-     *                  belong to the US-ASCII charset. MOSTLY_ASCII
-     *                  if more than half of the available characters
-     *                  are US-ASCII characters. Else MOSTLY_NONASCII.
-     */
-    static int checkAscii(String s) {
-        int ascii = 0, non_ascii = 0;
-        int l = s.length();
-
-        for (int i = 0; i < l; i++) {
-            if (nonascii((int)s.charAt(i))) // non-ascii
-                non_ascii++;
-            else
-                ascii++;
-        }
-
-        if (non_ascii == 0)
-            return ALL_ASCII;
-        if (ascii > non_ascii)
-            return MOSTLY_ASCII;
-
-        return MOSTLY_NONASCII;
-    }
-
-    /**
-     * Check if the given byte array contains non US-ASCII characters.
-     * @param   b       byte array
-     * @return          ALL_ASCII if all characters in the string
-     *                  belong to the US-ASCII charset. MOSTLY_ASCII
-     *                  if more than half of the available characters
-     *                  are US-ASCII characters. Else MOSTLY_NONASCII.
-     *
-     * XXX - this method is no longer used
-     */
-    static int checkAscii(byte[] b) {
-        int ascii = 0, non_ascii = 0;
-
-        for (int i=0; i < b.length; i++) {
-            // The '&' operator automatically causes b[i] to be promoted
-            // to an int, and we mask out the higher bytes in the int
-            // so that the resulting value is not a negative integer.
-            if (nonascii(b[i] & 0xff)) // non-ascii
-                non_ascii++;
-            else
-                ascii++;
-        }
-
-        if (non_ascii == 0)
-            return ALL_ASCII;
-        if (ascii > non_ascii)
-            return MOSTLY_ASCII;
-
-        return MOSTLY_NONASCII;
-    }
-
-    /**
-     * Check if the given input stream contains non US-ASCII characters.
-     * Upto <code>max</code> bytes are checked. If <code>max</code> is
-     * set to <code>ALL</code>, then all the bytes available in this
-     * input stream are checked. If <code>breakOnNonAscii</code> is true
-     * the check terminates when the first non-US-ASCII character is
-     * found and MOSTLY_NONASCII is returned. Else, the check continues
-     * till <code>max</code> bytes or till the end of stream.
-     *
-     * @param   is      the input stream
-     * @param   max     maximum bytes to check for. The special value
-     *                  ALL indicates that all the bytes in this input
-     *                  stream must be checked.
-     * @param   breakOnNonAscii if <code>true</code>, then terminate the
-     *                  the check when the first non-US-ASCII character
-     *                  is found.
-     * @return          ALL_ASCII if all characters in the string
-     *                  belong to the US-ASCII charset. MOSTLY_ASCII
-     *                  if more than half of the available characters
-     *                  are US-ASCII characters. Else MOSTLY_NONASCII.
-     */
-    static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {
-        int ascii = 0, non_ascii = 0;
-        int len;
-        int block = 4096;
-        int linelen = 0;
-        boolean longLine = false, badEOL = false;
-        boolean checkEOL = encodeEolStrict && breakOnNonAscii;
-        byte buf[] = null;
-        if (max != 0) {
-            block = (max == ALL) ? 4096 : Math.min(max, 4096);
-            buf = new byte[block];
-        }
-        while (max != 0) {
-            try {
-                if ((len = is.read(buf, 0, block)) == -1)
-                    break;
-                int lastb = 0;
-                for (int i = 0; i < len; i++) {
-                    // The '&' operator automatically causes b[i] to
-                    // be promoted to an int, and we mask out the higher
-                    // bytes in the int so that the resulting value is
-                    // not a negative integer.
-                    int b = buf[i] & 0xff;
-                    if (checkEOL &&
-                            ((lastb == '\r' && b != '\n') ||
-                            (lastb != '\r' && b == '\n')))
-                        badEOL = true;
-                    if (b == '\r' || b == '\n')
-                        linelen = 0;
-                    else {
-                        linelen++;
-                        if (linelen > 998)      // 1000 - CRLF
-                            longLine = true;
-                    }
-                    if (nonascii(b)) {  // non-ascii
-                        if (breakOnNonAscii) // we are done
-                            return MOSTLY_NONASCII;
-                        else
-                            non_ascii++;
-                    } else
-                        ascii++;
-                    lastb = b;
-                }
-            } catch (IOException ioex) {
-                break;
-            }
-            if (max != ALL)
-                max -= len;
-        }
-
-        if (max == 0 && breakOnNonAscii)
-            // We have been told to break on the first non-ascii character.
-            // We haven't got any non-ascii character yet, but then we
-            // have not checked all of the available bytes either. So we
-            // cannot say for sure that this input stream is ALL_ASCII,
-            // and hence we must play safe and return MOSTLY_NONASCII
-
-            return MOSTLY_NONASCII;
-
-        if (non_ascii == 0) { // no non-us-ascii characters so far
-            // If we're looking at non-text data, and we saw CR without LF
-            // or vice versa, consider this mostly non-ASCII so that it
-            // will be base64 encoded (since the quoted-printable encoder
-            // doesn't encode this case properly).
-            if (badEOL)
-                return MOSTLY_NONASCII;
-            // if we've seen a long line, we degrade to mostly ascii
-            else if (longLine)
-                return MOSTLY_ASCII;
-            else
-                return ALL_ASCII;
-        }
-        if (ascii > non_ascii) // mostly ascii
-            return MOSTLY_ASCII;
-        return MOSTLY_NONASCII;
-    }
-
-    static final boolean nonascii(int b) {
-        return b >= 0177 || (b < 040 && b != '\r' && b != '\n' && b != '\t');
-    }
-}
-
-/**
- * An OutputStream that determines whether the data written to
- * it is all ASCII, mostly ASCII, or mostly non-ASCII.
- */
-class AsciiOutputStream extends OutputStream {
-    private boolean breakOnNonAscii;
-    private int ascii = 0, non_ascii = 0;
-    private int linelen = 0;
-    private boolean longLine = false;
-    private boolean badEOL = false;
-    private boolean checkEOL = false;
-    private int lastb = 0;
-    private int ret = 0;
-
-    public AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict) {
-        this.breakOnNonAscii = breakOnNonAscii;
-        checkEOL = encodeEolStrict && breakOnNonAscii;
-    }
-
-    public void write(int b) throws IOException {
-        check(b);
-    }
-
-    public void write(byte b[]) throws IOException {
-        write(b, 0, b.length);
-    }
-
-    public void write(byte b[], int off, int len) throws IOException {
-        len += off;
-        for (int i = off; i < len ; i++)
-            check(b[i]);
-    }
-
-    private final void check(int b) throws IOException {
-        b &= 0xff;
-        if (checkEOL &&
-                ((lastb == '\r' && b != '\n') || (lastb != '\r' && b == '\n')))
-            badEOL = true;
-        if (b == '\r' || b == '\n')
-            linelen = 0;
-        else {
-            linelen++;
-            if (linelen > 998)  // 1000 - CRLF
-                longLine = true;
-        }
-        if (MimeUtility.nonascii(b)) { // non-ascii
-            non_ascii++;
-            if (breakOnNonAscii) {      // we are done
-                ret = MimeUtility.MOSTLY_NONASCII;
-                throw new EOFException();
-            }
-        } else
-            ascii++;
-        lastb = b;
-    }
-
-    /**
-     * Return ASCII-ness of data stream.
-     */
-    public int getAscii() {
-        if (ret != 0)
-            return ret;
-        // If we're looking at non-text data, and we saw CR without LF
-        // or vice versa, consider this mostly non-ASCII so that it
-        // will be base64 encoded (since the quoted-printable encoder
-        // doesn't encode this case properly).
-        if (badEOL)
-            return MimeUtility.MOSTLY_NONASCII;
-        else if (non_ascii == 0) { // no non-us-ascii characters so far
-            // if we've seen a long line, we degrade to mostly ascii
-            if (longLine)
-                return MimeUtility.MOSTLY_ASCII;
-            else
-                return MimeUtility.ALL_ASCII;
-        }
-        if (ascii > non_ascii) // mostly ascii
-            return MimeUtility.MOSTLY_ASCII;
-        return MimeUtility.MOSTLY_NONASCII;
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ParameterList.java     1.10 03/02/12
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * This class holds MIME parameters (attribute-value pairs).
- *
- * @version 1.10, 03/02/12
- * @author  John Mani
- */
-
-public final class ParameterList {
-
-    private final HashMap list;
-
-    /**
-     * No-arg Constructor.
-     */
-    public ParameterList() {
-        this.list = new HashMap();
-    }
-
-    private ParameterList(HashMap m) {
-        this.list = m;
-    }
-
-    /**
-     * Constructor that takes a parameter-list string. The String
-     * is parsed and the parameters are collected and stored internally.
-     * A ParseException is thrown if the parse fails.
-     * Note that an empty parameter-list string is valid and will be
-     * parsed into an empty ParameterList.
-     *
-     * @param   s       the parameter-list string.
-     * @exception       ParseException if the parse fails.
-     */
-    public ParameterList(String s) throws ParseException {
-        HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-        HeaderTokenizer.Token tk;
-        int type;
-        String name;
-
-        list = new HashMap();
-        while (true) {
-            tk = h.next();
-            type = tk.getType();
-
-            if (type == HeaderTokenizer.Token.EOF) // done
-                return;
-
-            if ((char)type == ';') {
-                // expect parameter name
-                tk = h.next();
-                // tolerate trailing semicolon, even though it violates the spec
-                if (tk.getType() == HeaderTokenizer.Token.EOF)
-                    return;
-                // parameter name must be a MIME Atom
-                if (tk.getType() != HeaderTokenizer.Token.ATOM)
-                    throw new ParseException();
-                name = tk.getValue().toLowerCase();
-
-                // expect '='
-                tk = h.next();
-                if ((char)tk.getType() != '=')
-                    throw new ParseException();
-
-                // expect parameter value
-                tk = h.next();
-                type = tk.getType();
-                // parameter value must be a MIME Atom or Quoted String
-                if (type != HeaderTokenizer.Token.ATOM &&
-                    type != HeaderTokenizer.Token.QUOTEDSTRING)
-                    throw new ParseException();
-
-                list.put(name, tk.getValue());
-            } else
-                throw new ParseException();
-        }
-    }
-
-    /**
-     * Return the number of parameters in this list.
-     *
-     * @return  number of parameters.
-     */
-    public int size() {
-        return list.size();
-    }
-
-    /**
-     * Returns the value of the specified parameter. Note that
-     * parameter names are case-insensitive.
-     *
-     * @param name      parameter name.
-     * @return          Value of the parameter. Returns
-     *                  <code>null</code> if the parameter is not
-     *                  present.
-     */
-    public String get(String name) {
-        return (String)list.get(name.trim().toLowerCase());
-    }
-
-    /**
-     * Set a parameter. If this parameter already exists, it is
-     * replaced by this new value.
-     *
-     * @param   name    name of the parameter.
-     * @param   value   value of the parameter.
-     */
-    public void set(String name, String value) {
-        list.put(name.trim().toLowerCase(), value);
-    }
-
-    /**
-     * Removes the specified parameter from this ParameterList.
-     * This method does nothing if the parameter is not present.
-     *
-     * @param   name    name of the parameter.
-     */
-    public void remove(String name) {
-        list.remove(name.trim().toLowerCase());
-    }
-
-    /**
-     * Return an enumeration of the names of all parameters in this
-     * list.
-     *
-     * @return Enumeration of all parameter names in this list.
-     */
-    public Iterator getNames() {
-        return list.keySet().iterator();
-    }
-
-
-    /**
-     * Convert this ParameterList into a MIME String. If this is
-     * an empty list, an empty string is returned.
-     *
-     * @return          String
-     */
-    public String toString() {
-        return toString(0);
-    }
-
-    /**
-     * Convert this ParameterList into a MIME String. If this is
-     * an empty list, an empty string is returned.
-     *
-     * The 'used' parameter specifies the number of character positions
-     * already taken up in the field into which the resulting parameter
-     * list is to be inserted. It's used to determine where to fold the
-     * resulting parameter list.
-     *
-     * @param used      number of character positions already used, in
-     *                  the field into which the parameter list is to
-     *                  be inserted.
-     * @return          String
-     */
-    public String toString(int used) {
-        StringBuffer sb = new StringBuffer();
-        Iterator itr = list.entrySet().iterator();
-
-        while (itr.hasNext()) {
-            Map.Entry e = (Map.Entry)itr.next();
-            String name = (String)e.getKey();
-            String value = quote((String)e.getValue());
-            sb.append("; ");
-            used += 2;
-            int len = name.length() + value.length() + 1;
-            if (used + len > 76) { // overflows ...
-                sb.append("\r\n\t"); // .. start new continuation line
-                used = 8; // account for the starting <tab> char
-            }
-            sb.append(name).append('=');
-            used += name.length() + 1;
-            if (used + value.length() > 76) { // still overflows ...
-                // have to fold value
-                String s = MimeUtility.fold(used, value);
-                sb.append(s);
-                int lastlf = s.lastIndexOf('\n');
-                if (lastlf >= 0)        // always true
-                    used += s.length() - lastlf - 1;
-                else
-                    used += s.length();
-            } else {
-                sb.append(value);
-                used += value.length();
-            }
-        }
-
-        return sb.toString();
-    }
-
-    // Quote a parameter value token if required.
-    private String quote(String value) {
-        if ("".equals(value))
-                return "\"\"";
-        return MimeUtility.quote(value, HeaderTokenizer.MIME);
-    }
-
-    public ParameterList copy() {
-        return new ParameterList((HashMap)list.clone());
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ParseException.java    1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-/**
- * The exception thrown due to an error in parsing RFC822
- * or MIME headers
- *
- * @author John Mani
- */
-
-public class ParseException extends MessagingException {
-
-    /**
-     * Constructs a ParseException with no detail message.
-     */
-    public ParseException() {
-        super();
-    }
-
-    /**
-     * Constructs a ParseException with the specified detail message.
-     * @param s         the detail message
-     */
-    public ParseException(String s) {
-        super(s);
-    }
-}
--- a/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java	Thu Jan 08 12:08:26 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)SharedInputStream.java 1.2 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-// SAAJ doesn't utilize this, but I think it should.
-/**
- * An InputStream that is backed by data that can be shared by multiple
- * readers may implement this interface.  This allows users of such an
- * InputStream to determine the current positionin the InputStream, and
- * to create new InputStreams representing a subset of the data in the
- * original InputStream.  The new InputStream will access the same
- * underlying data as the original, without copying the data.
- *
- * @version 1.2, 02/03/27
- * @author  Bill Shannon
- * @since JavaMail 1.2
- */
-
-public interface SharedInputStream {
-    /**
-     * Return the current position in the InputStream, as an
-     * offset from the beginning of the InputStream.
-     *
-     * @return  the current position
-     */
-    public long getPosition();
-
-    /**
-     * Return a new InputStream representing a subset of the data
-     * from this InputStream, starting at <code>start</code> (inclusive)