Codota Logo
ProtocolDecoderException
Code IndexAdd Codota to your IDE (free)

How to use
ProtocolDecoderException
in
org.apache.mina.codec

Best Java code snippets using org.apache.mina.codec.ProtocolDecoderException (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: apache/mina

  private int optionFromQuartet(int value, ByteBuffer input) {
    if (value < 13) {
      return value;
    } else if (value == 13) {
      return (input.get() & 0xFF) + 13;
    } else if (value == 14) {
      return (input.getShort() & 0xFFFF) + 269;
    } else {
      throw new ProtocolDecoderException("illegal option quartet value : " + value);
    }
  }
}
origin: apache/mina

  @SuppressWarnings("unchecked")
  @Override
  public IN decode(IoBuffer input) {
    try {
      return (IN) parseMethod.invoke(null, input.asInputStream(), registry);
    } catch (Exception e) {
      throw new ProtocolDecoderException(e);
    }
  }
}
origin: apache/mina

  @SuppressWarnings("unchecked")
  @Override
  public IN decode(final IoBuffer input) {
    try {
      ObjectInputStream ois = new ObjectInputStream(input.asInputStream());
      IN s = (IN) ois.readObject();
      ois.close();
      return s;
    } catch (Exception ex) {
      throw new ProtocolDecoderException(ex);
    }
  }
}
origin: apache/mina

/**
 * {@inheritDoc}
 */
@Override
public OUTPUT decode(IoBuffer input) {
  OUTPUT object;
  try {
    byte array[] = new byte[input.remaining()];
    input.get(array);
    object = clazz.newInstance();
    deserializer.deserialize(object, array);
    return object;
  } catch (TException e) {
    throw new ProtocolDecoderException(e);
  } catch (InstantiationException e) {
    throw new ProtocolDecoderException(e);
  } catch (IllegalAccessException e) {
    throw new ProtocolDecoderException(e);
  }
}
origin: apache/mina

  @Override
  public T decode(IoBuffer input) {
    BinaryDecoder binaryDecoder = DecoderFactory.get().binaryDecoder(input.array(), null);
    ReflectDatumReader<T> reader = new ReflectDatumReader<T>(schema);
    T result = null;
    try {
      result = reader.read(null, binaryDecoder);
    }catch (IOException ioEx) {
      LOG.error("Error while decoding", ioEx);
      throw new ProtocolDecoderException(ioEx.getMessage());
    }
    return result;
  }
}
origin: apache/mina

    throw new ProtocolDecoderException("unknown option code : " + optionCode);
throw new ProtocolDecoderException("trailling " + input.remaining() + " bytes in the UDP datagram");
origin: apache/mina

  throw new ProtocolDecoderException(cce);
} finally {
  ctx.reset();
origin: apache/mina

  throw new ProtocolDecoderException(cce);
} finally {
  ctx.reset();
origin: apache/mina

  result |= tmp << 28;
} else {
  throw new ProtocolDecoderException("Not the varint representation of a signed int32");
origin: org.apache.mina/mina-coap

  private int optionFromQuartet(int value, ByteBuffer input) {
    if (value < 13) {
      return value;
    } else if (value == 13) {
      return (input.get() & 0xFF) + 13;
    } else if (value == 14) {
      return (input.getShort() & 0xFFFF) + 269;
    } else {
      throw new ProtocolDecoderException("illegal option quartet value : " + value);
    }
  }
}
origin: org.apache.mina/mina-coap

    throw new ProtocolDecoderException("unknown option code : " + optionCode);
throw new ProtocolDecoderException("trailling " + input.remaining() + " bytes in the UDP datagram");
org.apache.mina.codecProtocolDecoderException

Javadoc

Exception thrown by a ProtocolDecoder if something wrong happen during decoding.

Most used methods

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Collectors (java.util.stream)
  • BoxLayout (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now