1 2 17 18 19 package org.apache.poi.poifs.filesystem; 20 21 import java.io.*; 22 import java.util.Random ; 23 24 28 public class SlowInputStream extends FilterInputStream 29 { 30 private Random r = new Random (0); 31 32 public SlowInputStream(InputStream in) { 33 super(in); 34 } 35 36 public int read(byte[] b, int off, int len) throws IOException { 37 return super.read(b, off, r.nextInt(len) + 1); 38 } 39 } 40 | Popular Tags |