因为类OutputStream中有一个抽象方法,所以你必须自己定义一个OutputStream的子类,并自己实现其中的方法.   
  public abstract class OutputStream extends Object      This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.        Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output. 
  for example: 
  
        class MyOutputStream extends OutputStream {

public void write(int b) {
/////////
}

public void write(byte[] b) {
/////////
}

public void write(byte[] b,int off,int len) {
////////
}
}public class OutputPicture {

   private InputStream in;
   
   public  OutputPicture() {
   
   }
   
   public void setMyInputStream(InputStream in) {
   this.in=in;
   }
   
   public void outputPhoto(){
   byte[] b = new byte[1024*1024];
           int len;
           
           MyOutputStream out1 = new MyOutputStream();
           
   try{
            while((len=in.read(b))>0)
                     out1.write(b,0,len);
             out1.flush();
             
            in.close();  
   }
   catch(IOException e){
   System.out.println(e.getMessage());
   }
   }
   }
     }