com.sun.xml.internal.ws.util.ByteArrayDataSource Java Examples

The following examples show how to use com.sun.xml.internal.ws.util.ByteArrayDataSource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MtomCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #2
Source File: MtomCodec.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #3
Source File: MimeMultipartParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #4
Source File: MtomCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #5
Source File: MimeMultipartParser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #6
Source File: MimeMultipartParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #7
Source File: MtomCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #8
Source File: MtomCodec.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #9
Source File: MimeMultipartParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #10
Source File: MimeMultipartParser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #11
Source File: MimeMultipartParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #12
Source File: MtomCodec.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #13
Source File: MtomCodec.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #14
Source File: MimeMultipartParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #15
Source File: MtomCodec.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
    //check threshold and if less write as base64encoded value
    if(myMtomFeature.getThreshold() > len){
        writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
        return;
    }
    ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
    writeBinary(bab);
}
 
Example #16
Source File: MimeMultipartParser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DataHandler asDataHandler() {
    if (streamingDataHandler == null) {
        streamingDataHandler = (buf != null)
            ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
            : new MIMEPartStreamingDataHandler(part);
    }
    return streamingDataHandler;
}
 
Example #17
Source File: StreamAttachment.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #18
Source File: StreamAttachment.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #19
Source File: ByteArrayAttachment.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #20
Source File: ByteArrayAttachment.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #21
Source File: StreamAttachment.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #22
Source File: ByteArrayAttachment.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #23
Source File: StreamAttachment.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #24
Source File: ByteArrayAttachment.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #25
Source File: StreamAttachment.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #26
Source File: ByteArrayAttachment.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #27
Source File: StreamAttachment.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #28
Source File: ByteArrayAttachment.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}
 
Example #29
Source File: StreamAttachment.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
}
 
Example #30
Source File: ByteArrayAttachment.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public DataHandler asDataHandler() {
    return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
}