at.tuwien.ifs.feature.extraction.audio.output
Class SOMLibFormatWriter

java.lang.Object
  extended by at.tuwien.ifs.feature.extraction.audio.output.AbstractDataWriter
      extended by at.tuwien.ifs.feature.extraction.audio.output.SOMLibFormatWriter

public class SOMLibFormatWriter
extends AbstractDataWriter

Copyright Vienna University of Technology

Version:
$Id: SOMLibFormatWriter.java 179 2010-07-28 18:08:24Z mayer $ inspired by somtoolbox
Author:
Thomas Lidy

Field Summary
private  int matrixCols
           
private  int matrixRows
           
private  int numVectors
           
private  java.lang.String realFileName
           
 
Fields inherited from class at.tuwien.ifs.feature.extraction.audio.output.AbstractDataWriter
baseDirectory, classAssignmentResolver, dataTypeID, featureVectorLength, fileName, formatDouble, formatFloat, gzipped, nl, outFile
 
Constructor Summary
SOMLibFormatWriter(java.lang.String outFileName, boolean gzipped)
          Constructor for SOMLibFormatWriter.
 
Method Summary
 void close()
           
private  void writeHeader(java.io.BufferedWriter outFile)
           
 void writeVector(FeatureVectorData featureVector)
           
 
Methods inherited from class at.tuwien.ifs.feature.extraction.audio.output.AbstractDataWriter
checkVectorDim, initDecimalFormats, setBaseDirectory, setClassAssignmentResolver, setDataType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

realFileName

private final java.lang.String realFileName

numVectors

private int numVectors

matrixRows

private int matrixRows

matrixCols

private int matrixCols
Constructor Detail

SOMLibFormatWriter

public SOMLibFormatWriter(java.lang.String outFileName,
                          boolean gzipped)
                   throws java.io.IOException
Constructor for SOMLibFormatWriter. if the outFileName ends with ".gz" gzip compression will be enabled. If b

Parameters:
outFileName - the output filename
gzipped - set true to force gzip compression
Throws:
java.io.IOException
Method Detail

writeHeader

private void writeHeader(java.io.BufferedWriter outFile)
                  throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class AbstractDataWriter
Throws:
java.io.IOException

writeVector

public void writeVector(FeatureVectorData featureVector)
                 throws java.io.IOException
Specified by:
writeVector in class AbstractDataWriter
Throws:
java.io.IOException