package com.css.simulation.resource.common.infra.util;


import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;

public class ProgressInputStream extends BufferedInputStream {


    public ProgressInputStream(InputStream in){
        super(in);
    }


    @Override
    public int read(byte[] toStore, int off, int len) throws IOException {
        int readBytes = this.in.read(toStore, off, len);
        getStep(readBytes);
        return readBytes;
    }


    public void getStep(int readBytes){
        System.out.println("getStep:" + readBytes);
    }
}
