jpview.io
Class PTMIO

java.lang.Object
  extended by jpview.io.PTMIO

public abstract class PTMIO
extends java.lang.Object

Static PTM Reader factory

Author:
Default

Constructor Summary
PTMIO()
           
 
Method Summary
static float cFinal(int cRaw, int bias, float scale)
          Composes the raw coefficent value, the bias, and the scale to form a float representation of a coefficient
static int cFinalInt(int cRaw, int bias, float scale)
          Composes the raw coefficent value, the bias, and the scale into an integer representation of the coefficient
static java.lang.String getLine(java.io.InputStream in)
          Read a line of text.
static PTMReader getPTMParser(java.io.InputStream in)
          Returns a PTM reader suitable for the input stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTMIO

public PTMIO()
Method Detail

cFinal

public static float cFinal(int cRaw,
                           int bias,
                           float scale)
Composes the raw coefficent value, the bias, and the scale to form a float representation of a coefficient

Parameters:
cRaw - the raw coefficient value
bias - the bias
scale - the scale value
Returns:
the composed coefficient as a float

cFinalInt

public static int cFinalInt(int cRaw,
                            int bias,
                            float scale)
Composes the raw coefficent value, the bias, and the scale into an integer representation of the coefficient

Parameters:
cRaw - the raw coefficient value
bias - the bias value
scale - the scale value
Returns:
the coefficient as an integer

getPTMParser

public static PTMReader getPTMParser(java.io.InputStream in)
                              throws java.lang.Exception
Returns a PTM reader suitable for the input stream

Parameters:
in - the input stream
Returns:
a PTM reader suitable for the input stream
Throws:
java.lang.Exception - if the input stream cannot be read

getLine

public static java.lang.String getLine(java.io.InputStream in)
Read a line of text. Add EOF check, or use buffered stream.

Parameters:
in - the input stream
Returns:
the next line of text