package jp.sourceforge.nicoro.swf;

import static jp.sourceforge.nicoro.swf.Log.DEBUG_LOGV;
import static jp.sourceforge.nicoro.swf.Log.DEBUG_LOGD;
import static jp.sourceforge.nicoro.swf.Log.LOG_TAG;

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

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

	@Override
    public int read(byte[] bufferArray, int offset) {
    	ADPCMSOUNDDATA adpcm = this;
    	
    	int offsetNext;
		adpcm.data = new byte[bufferArray.length - offset];
		System.arraycopy(bufferArray, offset, adpcm.data, 0, adpcm.data.length);
		offsetNext = bufferArray.length;

		adpcm.readOffset = 0;
		
		return offsetNext;
    }

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