Commit 106898bf authored by Nachiappan Palaniappan's avatar Nachiappan Palaniappan
Browse files

A new method getBinaryData() has been implemented in the ValueEventData.java...

A new method getBinaryData() has been implemented in the ValueEventData.java class to enable applications retrieve the binary data as such from the ASN1OctetString with out converting it in to a String.
The return type of this method is the array of bytes and the data will be raw. It is left to the applications to manipulate the data to whichever format they prefer.
parent 08e28995
......@@ -52,7 +52,9 @@ import java.io.IOException;
public class ValueEventData implements EventResponseData {
private final String attribute;
private final String classid;
private final ASN1OctetString octData;
private final String data;
private final byte[] binData;
private final String entry;
private final String prepetratorDN;
private final String syntax;
......@@ -91,7 +93,9 @@ public class ValueEventData implements EventResponseData {
timeStamp =
new DSETimeStamp((ASN1Sequence) decode.decode(in, length));
data = ((ASN1OctetString) decode.decode(in, length)).stringValue();
octData = ((ASN1OctetString) decode.decode(in, length));
data = octData.stringValue();
binData = octData.byteValue();
verb = ((ASN1Integer) decode.decode(in, length)).intValue();
}
......@@ -123,6 +127,14 @@ public class ValueEventData implements EventResponseData {
return data;
}
/**
* Returns the binaryData.
*
* @return Data as Byte Array.
*/
public byte[] getBinaryData() {
return binData;
}
/**
* Return the Entry.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment