public SampleSet(ByteBuffer bb) throws IOException {
  int numSamples;
  sampleInfo=new SampleInfo(bb);
  numSamples=bb.getInt();
  this.samples=new Sample[numSamples];
  for (int i=0; i < numSamples; i++) {
    samples[i]=Sample.loadBinary(bb);
  }
}

public SampleSet ( ByteBuffer bb ) throws IOException { int numSamples ; sampleInfo = new SampleInfo ( bb ) ; numSamples = bb . getInt ( ) ; this . samples = new Sample [ numSamples ] ; for ( int i = 0 ; i < numSamples ; i ++ ) { samples [ i ] = Sample . loadBinary ( bb ) ; } }
creates a sampleset by reading it from the given byte buffer
