Codota Logo
ProtocolDecoderException.<init>
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using org.apache.mina.codec.ProtocolDecoderException.<init> (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<init>

Popular methods of ProtocolDecoderException

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getSharedPreferences (Context)
    • putExtra (Intent)
    • startActivity (Activity)
    • Component (java.awt)
      A component is an object having a graphical representation that can be displayed on the screen and t
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • Selector (java.nio.channels)
      A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
    • Modifier (javassist)
      The Modifier class provides static methods and constants to decode class and member access modifiers
    • StringUtils (org.apache.commons.lang)
      Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
    • LogFactory (org.apache.commons.logging)
      A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
    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