public FlacDecoder(int numInputBuffers,int numOutputBuffers,List<byte[]> initializationData) throws FlacDecoderException {
  super(new InputBuffer[numInputBuffers],new FlacOutputBuffer[numOutputBuffers]);
  if (initializationData.size() != 1) {
    throw new FlacDecoderException("Wrong number of initialization data");
  }
  decoder=new FlacJni();
  ByteBuffer metadata=ByteBuffer.wrap(initializationData.get(0));
  decoder.setData(metadata);
  FlacStreamInfo streamInfo=decoder.decodeMetadata();
  if (streamInfo == null) {
    throw new FlacDecoderException("Metadata decoding failed");
  }
  setInitialInputBufferSize(streamInfo.maxFrameSize);
  maxOutputBufferSize=streamInfo.maxDecodedFrameSize();
}

public FlacDecoder ( int numInputBuffers , int numOutputBuffers , List < byte [ ] > initializationData ) throws FlacDecoderException { super ( new InputBuffer [ numInputBuffers ] , new FlacOutputBuffer [ numOutputBuffers ] ) ; if ( initializationData . size ( ) != 1 ) { throw new FlacDecoderException ( "Wrong number of initialization data" ) ; } decoder = new FlacJni ( ) ; ByteBuffer metadata = ByteBuffer . wrap ( initializationData . get ( 0 ) ) ; decoder . setData ( metadata ) ; FlacStreamInfo streamInfo = decoder . decodeMetadata ( ) ; if ( streamInfo == null ) { throw new FlacDecoderException ( "Metadata decoding failed" ) ; } setInitialInputBufferSize ( streamInfo . maxFrameSize ) ; maxOutputBufferSize = streamInfo . maxDecodedFrameSize ( ) ; }
creates a flac decoder .
