Class JDXDecompressor
java.lang.Object
jspecview.source.JDXDecompressor
JDXDecompressor contains static methods to decompress the data part of
JCAMP-DX spectra that have been compressed using DIF, FIX, SQZ or PAC
formats. If you wish to parse the data from XY formats see
Coordinate.parseDSV(java.lang.String, double, double)- Author:
- Christopher Muir, Debbie-Ann Facey, Khari A. Bryan, Prof Robert J. Lancashire, Bob Hanson - hansonr@stolaf.edu
-
Constructor Summary
ConstructorsConstructorDescriptionJDXDecompressor(String line, int lastY) JDXDecompressor(JDXSourceStreamTokenizer t, double firstX, double lastX, double xFactor, double yFactor, int nPoints) Initialises theJDXDecompressorfrom the compressed data, the x factor, the y factor and the deltaX value -
Method Summary
Modifier and TypeMethodDescriptiondecompressData(SB errorLog) Determines the type of compression, decompresses the data and stores coordinates in an array to be returneddoublegetMaxY()doublegetMinY()intReport out the number of points found (for error reporting)booleanhasNext()next()voidremove()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Constructor Details
-
JDXDecompressor
public JDXDecompressor(JDXSourceStreamTokenizer t, double firstX, double lastX, double xFactor, double yFactor, int nPoints) Initialises theJDXDecompressorfrom the compressed data, the x factor, the y factor and the deltaX value- Parameters:
t- the data to be decompressedfirstX- first x listed in filelastX- the last X listed in filexFactor- the x factoryFactor- the y factornPoints- the expected number of points
-
JDXDecompressor
-
-
Method Details
-
getMinY
public double getMinY() -
getMaxY
public double getMaxY() -
decompressData
Determines the type of compression, decompresses the data and stores coordinates in an array to be returned- Parameters:
errorLog-- Returns:
- the array of
Coordinates
-
getNPointsFound
public int getNPointsFound()Report out the number of points found (for error reporting)- Returns:
- the number of points found
-
hasNext
-
next
-
remove
-