|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pmstation.spss.reader.SPSSReader
public class SPSSReader
Reads data from spss file.
Constructor Summary | |
---|---|
SPSSReader(java.io.File file,
java.lang.String charset)
Instantiates a new SPSS reader. |
|
SPSSReader(java.io.InputStream in,
java.lang.String charset)
Instantiates a new sPSS reader. |
|
SPSSReader(java.lang.String fileName,
java.lang.String charset)
Instantiates a new SPSS reader. |
Method Summary | |
---|---|
java.lang.String |
getCharset()
Gets the charset. |
double |
getCompressionBias()
Gets the compression bias. |
java.util.Date |
getCreationDate()
Gets the creation date. |
java.lang.String |
getFileLabel()
Gets the file label. |
java.io.InputStream |
getIn()
Gets the input stream. |
int |
getLayoutCode()
Gets the layout code. |
int |
getNumberOfCases()
Gets the number of cases. |
int |
getNumberOfVariables()
Gets the number of variables. |
int |
getOrdinal(SPSSVariable var)
Gets index of given variable. |
int |
getOrdinal(java.lang.String varName)
Gets index of the variable with given name . |
SPSSRecord |
getRawDictionaryRecord(java.lang.Class cls,
int idx)
Gets the raw dictionary record of specified class. |
java.util.Vector |
getRawDictionaryRecords()
Gets the raw dictionary records. |
java.util.Vector |
getRawDictionaryRecords(java.lang.Class cls)
Gets the raw dictionary records of specified class. |
java.lang.Object |
getValue(int ordinal)
Gets value of specified variable number in last read row. |
java.lang.Object |
getValue(SPSSVariable var)
Gets the value for given variable in last read row. |
java.lang.Object |
getValue(java.lang.String varName)
Gets the value of variable with given name in last read row. |
java.util.Vector |
getVariables()
Gets the variables. |
boolean |
isCompressed()
Checks if is compressed. |
boolean |
read()
Reads next data row. |
void |
setCharset(java.lang.String charset)
Sets the charset. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SPSSReader(java.lang.String fileName, java.lang.String charset) throws java.io.IOException
fileName
- the file namecharset
- the charset
java.io.IOException
- Signals that an I/O exception has occurred.public SPSSReader(java.io.InputStream in, java.lang.String charset) throws java.io.IOException
in
- Input streamcharset
- the charset
java.io.IOException
- Signals that an I/O exception has occurred.public SPSSReader(java.io.File file, java.lang.String charset) throws java.io.IOException
file
- the filecharset
- the charset
java.io.IOException
- Signals that an I/O exception has occurred.Method Detail |
---|
public java.io.InputStream getIn()
SPSSInputStream
class built over supplied stream
SPSSInputStream
built over supplied streampublic java.lang.String getCharset()
public void setCharset(java.lang.String charset)
charset
- the new charsetpublic int getNumberOfCases()
public int getNumberOfVariables()
public java.util.Vector getVariables()
SPSSVariable
class
public java.util.Vector getRawDictionaryRecords()
SPSSRecord
public java.util.Vector getRawDictionaryRecords(java.lang.Class cls)
cls
- the record class
public SPSSRecord getRawDictionaryRecord(java.lang.Class cls, int idx)
cls
- the record classidx
- the record index in class
public boolean read() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public java.lang.Object getValue(int ordinal)
ordinal
- variable number
public java.lang.Object getValue(SPSSVariable var)
var
- the variable
public java.lang.Object getValue(java.lang.String varName)
varName
- the variable name
public int getOrdinal(java.lang.String varName)
varName
- the variable name
public int getOrdinal(SPSSVariable var)
var
- the variable
public double getCompressionBias()
public boolean isCompressed()
public java.util.Date getCreationDate()
public java.lang.String getFileLabel()
public int getLayoutCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |