Examples of DecoderException


Examples of com.braintreegateway.org.apache.commons.codec.DecoderException

        if (pObject instanceof byte[]) {
            return decode((byte[]) pObject);
        } else if (pObject instanceof String) {
            return decode((String) pObject);
        } else {
            throw new DecoderException("Parameter supplied to Base64 decode is not a byte[] or a String");
        }
    }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.commons.codec.DecoderException

            return null;
        }
        try {
            return decodeText(pString);
        } catch (UnsupportedEncodingException e) {
            throw new DecoderException(e.getMessage());
        }
    }
View Full Code Here

Examples of io.netty.handler.codec.DecoderException

    @Override
    public void exceptionCaught(final ChannelHandlerContext context, final Throwable cause) {
      this.rejectFutureNotifications = true;

      if (cause instanceof DecoderException) {
        final DecoderException decoderException = (DecoderException)cause;

        if (decoderException.getCause() instanceof ApnsDecoderException) {
          if (this.server.shouldSendErrorResponses()) {
            final ApnsDecoderException apnsDecoderException = (ApnsDecoderException)decoderException.getCause();
            final RejectedNotification rejectedNotification =
                new RejectedNotification(apnsDecoderException.sequenceNumber, apnsDecoderException.reason);

            context.writeAndFlush(rejectedNotification).addListener(ChannelFutureListener.CLOSE);
          }
View Full Code Here

Examples of org.apache.commons.codec.DecoderException

                try {
                    final int u = Utils.digit16(bytes[++i]);
                    final int l = Utils.digit16(bytes[++i]);
                    buffer.write((char) ((u << 4) + l));
                } catch (final ArrayIndexOutOfBoundsException e) {
                    throw new DecoderException("Invalid URL encoding: ", e);
                }
            } else {
                buffer.write(b);
            }
        }
View Full Code Here

Examples of org.apache.commons.codec.DecoderException

            return null;
        }
        try {
            return decode(str, getDefaultCharset());
        } catch (final UnsupportedEncodingException e) {
            throw new DecoderException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.commons.codec.DecoderException

        } else if (obj instanceof byte[]) {
            return decode((byte[]) obj);
        } else if (obj instanceof String) {
            return decode((String) obj);
        } else {
            throw new DecoderException("Objects of type " + obj.getClass().getName() + " cannot be URL decoded");

        }
    }
View Full Code Here

Examples of org.apache.commons.codec.DecoderException

            throws DecoderException, UnsupportedEncodingException {
        if (text == null) {
            return null;
        }
        if (!text.startsWith(PREFIX) || !text.endsWith(POSTFIX)) {
            throw new DecoderException("RFC 1522 violation: malformed encoded content");
        }
        final int terminator = text.length() - 2;
        int from = 2;
        int to = text.indexOf(SEP, from);
        if (to == terminator) {
            throw new DecoderException("RFC 1522 violation: charset token not found");
        }
        final String charset = text.substring(from, to);
        if (charset.equals("")) {
            throw new DecoderException("RFC 1522 violation: charset not specified");
        }
        from = to + 1;
        to = text.indexOf(SEP, from);
        if (to == terminator) {
            throw new DecoderException("RFC 1522 violation: encoding token not found");
        }
        final String encoding = text.substring(from, to);
        if (!getEncoding().equalsIgnoreCase(encoding)) {
            throw new DecoderException("This codec cannot decode " + encoding + " encoded content");
        }
        from = to + 1;
        to = text.indexOf(SEP, from);
        byte[] data = StringUtils.getBytesUsAscii(text.substring(from, to));
        data = doDecoding(data);
View Full Code Here

Examples of org.apache.directory.api.asn1.DecoderException

        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        KrbCred krbCred = new KrbCred();
        krbCredContainer.setKrbCred( krbCred );
View Full Code Here

Examples of org.apache.directory.api.asn1.DecoderException

        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        // decoder for Ticket
        Asn1Decoder decoder = new Asn1Decoder();
View Full Code Here

Examples of org.apache.directory.api.asn1.DecoderException

        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
        }

        // Create the Ticket now
        Ticket ticket = new Ticket();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.