com.daxie.xops.pd1.PD1Parser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xopsmanipulator Show documentation
Show all versions of xopsmanipulator Show documentation
XOPSManipulator is a Java library that offers several functions to manipulate matters relating to X operations.
The newest version!
package com.daxie.xops.pd1;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import com.daxie.tool.ByteFunctions;
import com.daxie.tool.FileFunctions;
/**
* Reads data from a PD1 file.
* @author Daba
*
*/
class PD1Parser {
private List points;
public PD1Parser(String pd1_filename) throws FileNotFoundException{
points=new ArrayList<>();
List bin=FileFunctions.GetFileAllBin(pd1_filename);
int count=0;
//Number of points
byte[] point_num_buffer=new byte[2];
point_num_buffer[0]=bin.get(count);
point_num_buffer[1]=bin.get(count+1);
int point_num=ByteFunctions.byte_to_ushort_le(point_num_buffer);
count+=2;
//Points
for(int i=0;i GetPoints(){
return new ArrayList<>(points);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy