@Test public void testDecodeString() throws UtilityException, DataTypeLengthMismatchException, UnknownHostException, MissingAbstractDataTypeException { byte[] data = IpfixUtilities.hexStringToByteArray("44534c31"); int length = 4; IpfixDataRecordDecodeMethod method = new DecodeString(); String value = method.decodeDataRecord(data, length); assertEquals("DSL1", value); }
@Override public String decodeDataRecord(byte[] data, int length) throws UtilityException { byte[] stringOctets = IpfixUtilities.copyByteArray(data, 0, length); return IpfixUtilities.byteArrayToString(stringOctets); }
DecodeString implements IpfixDataRecordDecodeMethod { @Override public String decodeDataRecord(byte[] data, int length) throws UtilityException { byte[] stringOctets = IpfixUtilities.copyByteArray(data, 0, length); return IpfixUtilities.byteArrayToString(stringOctets); } }
DecodeString implements IpfixDataRecordDecodeMethod { @Override public String decodeDataRecord(byte[] data, int length) throws UtilityException { byte[] stringOctets = IpfixUtilities.copyByteArray(data, 0, length); return IpfixUtilities.byteArrayToString(stringOctets); }  }
DecodeString implements IpfixDataRecordDecodeMethod { @Override public String decodeDataRecord(byte[] data, int length) throws UtilityException { byte[] stringOctets = IpfixUtilities.copyByteArray(data, 0, length); return IpfixUtilities.byteArrayToString(stringOctets); }  @Override String decodeDataRecord(byte[] data, int length); }
DecodeString implements IpfixDataRecordDecodeMethod { @Override public String decodeDataRecord(byte[] data, int length) throws UtilityException { byte[] stringOctets = IpfixUtilities.copyByteArray(data, 0, length); return IpfixUtilities.byteArrayToString(stringOctets); }  @Override String decodeDataRecord(byte[] data, int length);  }