Package org.codehaus.stax2.ri

Examples of org.codehaus.stax2.ri.Stax2ReaderImpl


    }

    public byte[] getAttributeAsBinary(int index, Base64Variant v) throws XMLStreamException
    {
        String lexical = getAttributeValue(index);
        final StringBase64Decoder dec = _base64Decoder();
        dec.init(v, true, lexical);
        try {
            return dec.decodeCompletely();
        } catch (IllegalArgumentException iae) {
            throw new TypedXMLStreamException(lexical, iae.getMessage(), getLocation(), iae);
        }
    }
View Full Code Here


    }

    protected StringBase64Decoder _base64Decoder()
    {
        if (_base64Decoder == null) {
            _base64Decoder = new StringBase64Decoder();
        }
        return _base64Decoder;
    }
View Full Code Here

    }

    protected ValueDecoderFactory _decoderFactory()
    {
        if (_decoderFactory == null) {
            _decoderFactory = new ValueDecoderFactory();
        }
        return _decoderFactory;
    }
View Full Code Here

     */

    protected ValueDecoderFactory _decoderFactory()
    {
        if (_decoderFactory == null) {
            _decoderFactory = new ValueDecoderFactory();
        }
        return _decoderFactory;
    }
View Full Code Here

     */

    protected ValueDecoderFactory _decoderFactory()
    {
        if (_decoderFactory == null) {
            _decoderFactory = new ValueDecoderFactory();
        }
        return _decoderFactory;
    }
View Full Code Here

     */

    protected ValueDecoderFactory _decoderFactory()
    {
        if (_decoderFactory == null) {
            _decoderFactory = new ValueDecoderFactory();
        }
        return _decoderFactory;
    }
View Full Code Here

             * data:
             */
            int ptr = 0;
            do {
                int chunkLen = 1 + (r.nextInt() & 0x7);
                AsciiValueEncoder enc = new ValueEncoderFactory().getEncoder(b64variant, data, ptr, chunkLen);
                ptr += chunkLen;
                int len = enc.encodeMore(buffer, 0, buffer.length);
                b64.append(buffer, 0, len);
            } while (b64.length() < SIZE);
            // And then create document, with split content
View Full Code Here

        // So first we'll encode 1 to 6 bytes as base64
        for (int bv = 0; bv < sPaddingVariants.length; ++bv) {
            Base64Variant b64variant = sPaddingVariants[bv];
            for (int i = 1; i <= data.length; ++i) {
                AsciiValueEncoder enc = new ValueEncoderFactory().getEncoder(b64variant, data, 0, i);
                char[] cbuf = new char[20];
                int clen = enc.encodeMore(cbuf, 0, cbuf.length);
               
                // and use all byte last 1, 2 or 3 chars
                for (int j = 1; j <= 3; ++j) {
View Full Code Here

                Base64Variant b64variant = sBase64Variants[bv];
                for (int i = 0; i < LEN_ATTR.length; ++i) {
                    int size = LEN_ATTR[i];
                    byte[] data = generateData(new Random(size), size);
                    char[] buffer = new char[4 + (data.length * 3 / 2)];
                    AsciiValueEncoder enc = new ValueEncoderFactory().getEncoder(b64variant, data, 0, data.length);
                    int len = enc.encodeMore(buffer, 0, buffer.length);
                    StringBuilder sb = new StringBuilder(buffer.length + 32);
                    sb.append("<root attr='");
                    sb.append(buffer, 0, len);
                    sb.append("' />");
View Full Code Here

        for (int bv = 0; bv < sPaddingVariants.length; ++bv) {
            Base64Variant b64variant = sPaddingVariants[bv];

            // So first we'll encode 1 to 6 bytes as base64
            for (int i = 1; i <= data.length; ++i) {
                AsciiValueEncoder enc = new ValueEncoderFactory().getEncoder(b64variant, data, 0, i);
                char[] cbuf = new char[20];
                int clen = enc.encodeMore(cbuf, 0, cbuf.length);
               
                // and use all byte last 1, 2 or 3 chars
                for (int j = 1; j <= 3; ++j) {
View Full Code Here

TOP

Related Classes of org.codehaus.stax2.ri.Stax2ReaderImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.