Search in sources :

Example 6 with KlvLocalSet

use of org.codice.ddf.libs.klv.data.set.KlvLocalSet in project ddf by codice.

the class KlvDecoderTest method getKLVContext.

private KlvContext getKLVContext(final Set<? extends KlvDataElement> dataElements) {
    final KlvContext localSetContext = new KlvContext(KeyLength.ONE_BYTE, LengthEncoding.ONE_BYTE, dataElements);
    final KlvLocalSet outerSet = new KlvLocalSet(new byte[] { 0x06, 0x0E, 0x2B, 0x34, 0x02, 0x0B, 0x01, 0x01, 0x0E, 0x01, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00 }, UAS_DATALINK_LOCAL_SET_UNIVERSAL_KEY, localSetContext);
    final Set<KlvDataElement> outerSetContext = Collections.singleton(outerSet);
    return new KlvContext(KeyLength.SIXTEEN_BYTES, LengthEncoding.BER, outerSetContext);
}
Also used : KlvLocalSet(org.codice.ddf.libs.klv.data.set.KlvLocalSet)

Aggregations

KlvLocalSet (org.codice.ddf.libs.klv.data.set.KlvLocalSet)6 KlvContext (org.codice.ddf.libs.klv.KlvContext)3 KlvDataElement (org.codice.ddf.libs.klv.KlvDataElement)2 Test (org.junit.Test)2 InputStream (java.io.InputStream)1 KlvDecoder (org.codice.ddf.libs.klv.KlvDecoder)1 KlvDecodingException (org.codice.ddf.libs.klv.KlvDecodingException)1 KlvUnsignedShort (org.codice.ddf.libs.klv.data.numerical.KlvUnsignedShort)1 KlvString (org.codice.ddf.libs.klv.data.text.KlvString)1 MPSDemuxer (org.jcodec.containers.mps.MPSDemuxer)1