Tabnine Logo
ProtocolDecoderException
Code IndexAdd Tabnine 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)

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

  • Start an intent from android
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now