org.fudgemsg
Class UnknownFudgeFieldValue

java.lang.Object
  extended by org.fudgemsg.UnknownFudgeFieldValue

public class UnknownFudgeFieldValue
extends Object

A container to store a variable-sized field with a type that the current installation of Fudge cannot handle on decoding.

In general, while Fudge supports an infinite number of UnknownFudgeFieldType instances with a particular type ID, it is optimal to use the factory method FudgeTypeDictionary.getUnknownType(int) to obtain one for a particular context, which is what the Fudge decoding routines will do.

This class holds a mutable byte array but is unmodifiable.


Constructor Summary
UnknownFudgeFieldValue(byte[] contents, UnknownFudgeFieldType type)
          Creates a new instance to represent a block of data in an unknown type.
 
Method Summary
 byte[] getContents()
          Gets the raw contents of the original data.
 UnknownFudgeFieldType getType()
          Gets the UnknownFudgeFieldType definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnknownFudgeFieldValue

public UnknownFudgeFieldValue(byte[] contents,
                              UnknownFudgeFieldType type)
Creates a new instance to represent a block of data in an unknown type.

Parameters:
contents - the raw contents from the Fudge message stream, not null
type - the field type for the unknown type, not null
Method Detail

getContents

public byte[] getContents()
Gets the raw contents of the original data.

Returns:
the data content, not null

getType

public UnknownFudgeFieldType getType()
Gets the UnknownFudgeFieldType definition.

Returns:
the field type, not null


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0