I would like to seperate the header from the Data and store it in a String[].
private String[] GetHeader(byte[] rawData)
{
String[] temp;
String delimiterString = "\r";
char[] delimiter = delimiterString.ToCharArray();
temp = ASCIIEncoding.ASCII.GetString(rawData).Split(delimiter,11);
for (int i = 0; i < temp.Length; i++)
{
temp[i] = temp[i].TrimStart('\n');
}
return temp;
}
At the moment this is all that I could come up with.
The next part is parsing the data out of the rawData
private byte[] GetData(byte[] rawData)
{
int j = 0;
int offset = GetContentOffset(rawData);
int length = rawData.Length - offset;
Byte[] tempData = new Byte[length];
for (int i = offset; i < rawData.Length; i++)
{
tempData[j] = rawData[i];
j++;
}
return tempData;
}
Thanks


Sign In
Create Account


Back to top









