package jp.sourceforge.nicoro.swf;

import java.io.IOException;
import java.io.OutputStream;

public class ADPCMSOUNDDATA extends StreamSoundDataBase {
	public byte[] data;

	@Override
    public int read(byte[] bufferArray, int offset, int bufferLength) {
    	ADPCMSOUNDDATA adpcm = this;

    	int offsetNext;
		adpcm.data = new byte[bufferLength - offset];
		System.arraycopy(bufferArray, offset, adpcm.data, 0, adpcm.data.length);
		offsetNext = bufferLength;

		adpcm.readOffset = 0;

		return offsetNext;
    }

	@Override
    public void writeData(OutputStream out) throws IOException {
		out.write(data);
	}
}
