Skip to content
Snippets Groups Projects
Commit 5873c103 authored by BAUER Oscar's avatar BAUER Oscar
Browse files

new branch for reading binary data line bye line

parent ac956dc2
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,16 @@ public class BinaryData implements Data {
this.completePackageString = this.toString();
this.keyWord = "Temperature4 [C];";
this.header = isolateHeader(completePackageString, keyWord);
this.headerString = binaryUtils.hexBytesToString(this.header);
// this.headerString = binaryUtils.hexBytesToString(this.header);
this.data = isolateData(this.completePackage, this.header.length);
}
private byte[] isolateHeader(String completePackageString, String key) {
int pos = posOfLast(completePackageString, key);
this.headerString = completePackageString.substring(0, pos);
byte[] header = new byte[pos];
System.arraycopy(completePackage, 0, header, 0, header.length);
return header;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment