public Object readValue() { try { return _describedTypeConstructor.newInstance(_underlyingEncoding.readValue()); } catch (NullPointerException npe) { throw new DecodeException("Unexpected null value - mandatory field not set? ("+npe.getMessage()+")", npe); } catch (ClassCastException cce) { throw new DecodeException("Incorrect type used", cce); } }
public Object readValue() { try { return _describedTypeConstructor.newInstance(_underlyingEncoding.readValue()); } catch (NullPointerException npe) { throw new DecodeException("Unexpected null value - mandatory field not set? ("+npe.getMessage()+")", npe); } catch (ClassCastException cce) { throw new DecodeException("Incorrect type used", cce); } }
public Object readValue() { try { return _describedTypeConstructor.newInstance(_underlyingEncoding.readValue()); } catch (NullPointerException npe) { throw new DecodeException("Unexpected null value - mandatory field not set? ("+npe.getMessage()+")", npe); } catch (ClassCastException cce) { throw new DecodeException("Incorrect type used", cce); } }
public SaslChallenge newInstance(Object described) { List l = (List) described; SaslChallenge o = new SaslChallenge(); if(l.isEmpty()) { throw new DecodeException("The challenge field cannot be omitted"); } o.setChallenge( (Binary) l.get( 0 ) ); return o; }
public SaslChallenge newInstance(Object described) { List l = (List) described; SaslChallenge o = new SaslChallenge(); if(l.isEmpty()) { throw new DecodeException("The challenge field cannot be omitted"); } o.setChallenge( (Binary) l.get( 0 ) ); return o; }
public Declared newInstance(Object described) { List l = (List) described; Declared o = new Declared(); if(l.isEmpty()) { throw new DecodeException("The txn-id field cannot be omitted"); } o.setTxnId( (Binary) l.get( 0 ) ); return o; }
public SaslChallenge newInstance(Object described) { List l = (List) described; SaslChallenge o = new SaslChallenge(); if(l.isEmpty()) { throw new DecodeException("The challenge field cannot be omitted"); } o.setChallenge( (Binary) l.get( 0 ) ); return o; }
public Declared newInstance(Object described) { List l = (List) described; Declared o = new Declared(); if(l.isEmpty()) { throw new DecodeException("The txn-id field cannot be omitted"); } o.setTxnId( (Binary) l.get( 0 ) ); return o; }
public Declared newInstance(Object described) { List l = (List) described; Declared o = new Declared(); if(l.isEmpty()) { throw new DecodeException("The txn-id field cannot be omitted"); } o.setTxnId( (Binary) l.get( 0 ) ); return o; }
public Declared newInstance(Object described) { List l = (List) described; Declared o = new Declared(); if(l.isEmpty()) { throw new DecodeException("The txn-id field cannot be omitted"); } o.setTxnId( (Binary) l.get( 0 ) ); return o; }
public SaslChallenge newInstance(Object described) { List l = (List) described; SaslChallenge o = new SaslChallenge(); if(l.isEmpty()) { throw new DecodeException("The challenge field cannot be omitted"); } o.setChallenge( (Binary) l.get( 0 ) ); return o; }
@Override public Character readCharacter(final Character defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.CHAR: return Character.valueOf((char) (readRawInt() & 0xffff)); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected Character type but found encoding: " + encodingCode); } }
@Override public Short readShort(final Short defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.SHORT: return Short.valueOf(readRawShort()); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected Short type but found encoding: " + encodingCode); } }
@Override public Byte readByte(final Byte defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.BYTE: return (Byte) readRawByte(); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected byte type but found encoding: " + encodingCode); } }
@Override public char readCharacter(final char defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.CHAR: return (char) (readRawInt() & 0xffff); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected Character type but found encoding: " + encodingCode); } }
public Object readObject() { TypeConstructor constructor = readConstructor(); if(constructor== null) { throw new DecodeException("Unknown constructor"); } return constructor instanceof ArrayType.ArrayEncoding ? ((ArrayType.ArrayEncoding)constructor).readValueArray() : constructor.readValue(); }
public Object readObject() { TypeConstructor constructor = readConstructor(); if(constructor== null) { throw new DecodeException("Unknown constructor"); } return constructor instanceof ArrayType.ArrayEncoding ? ((ArrayType.ArrayEncoding)constructor).readValueArray() : constructor.readValue(); }
public Object readObject() { TypeConstructor constructor = readConstructor(); if(constructor== null) { throw new DecodeException("Unknown constructor"); } return constructor instanceof ArrayType.ArrayEncoding ? ((ArrayType.ArrayEncoding)constructor).readValueArray() : constructor.readValue(); }
@Override public UnsignedByte readUnsignedByte(final UnsignedByte defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.UBYTE: return UnsignedByte.valueOf(readRawByte()); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected unsigned byte type but found encoding: " + encodingCode); } }
@Override public UnsignedShort readUnsignedShort(final UnsignedShort defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.USHORT: return UnsignedShort.valueOf(readRawShort()); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected UnsignedShort type but found encoding: " + encodingCode); } }