1 7 8 package com.sun.imageio.plugins.common; 9 10 import java.io.IOException ; 11 import java.io.InputStream ; 12 import javax.imageio.stream.ImageInputStream ; 13 14 17 public class InputStreamAdapter extends InputStream { 18 19 ImageInputStream stream; 20 21 public InputStreamAdapter(ImageInputStream stream) { 22 super(); 23 24 this.stream = stream; 25 } 26 27 public int read() throws IOException { 28 return stream.read(); 29 } 30 31 public int read(byte b[], int off, int len) throws IOException { 32 return stream.read(b, off, len); 33 } 34 } 35 | Popular Tags |