public SampleSet(StringTokenizer tok,BufferedReader reader){
  try {
    int numSamples=Integer.parseInt(tok.nextToken());
    int numChannels=Integer.parseInt(tok.nextToken());
    int sampleRate=Integer.parseInt(tok.nextToken());
    float coeffMin=Float.parseFloat(tok.nextToken());
    float coeffRange=Float.parseFloat(tok.nextToken());
    float postEmphasis=Float.parseFloat(tok.nextToken());
    int residualFold=Integer.parseInt(tok.nextToken());
    samples=new Sample[numSamples];
    sampleInfo=new SampleInfo(sampleRate,numChannels,residualFold,coeffMin,coeffRange,postEmphasis);
    for (int i=0; i < numSamples; i++) {
      samples[i]=new Sample(reader,numChannels);
    }
  }
 catch (  NoSuchElementException nse) {
    throw new Error("Parsing sample error " + nse.getMessage());
  }
}

public SampleSet ( StringTokenizer tok , BufferedReader reader ) { try { int numSamples = Integer . parseInt ( tok . nextToken ( ) ) ; int numChannels = Integer . parseInt ( tok . nextToken ( ) ) ; int sampleRate = Integer . parseInt ( tok . nextToken ( ) ) ; float coeffMin = Float . parseFloat ( tok . nextToken ( ) ) ; float coeffRange = Float . parseFloat ( tok . nextToken ( ) ) ; float postEmphasis = Float . parseFloat ( tok . nextToken ( ) ) ; int residualFold = Integer . parseInt ( tok . nextToken ( ) ) ; samples = new Sample [ numSamples ] ; sampleInfo = new SampleInfo ( sampleRate , numChannels , residualFold , coeffMin , coeffRange , postEmphasis ) ; for ( int i = 0 ; i < numSamples ; i ++ ) { samples [ i ] = new Sample ( reader , numChannels ) ; } } catch ( NoSuchElementException nse ) { throw new Error ( "Parsing sample error " + nse . getMessage ( ) ) ; } }
reads a sampleset from the input reader .
