/[classpath]/classpath/javax/imageio/stream/MemoryCacheImageInputStream.java
ViewVC logotype

Diff of /classpath/javax/imageio/stream/MemoryCacheImageInputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mkoch, Wed Oct 20 08:40:25 2004 UTC revision 1.2 by mkoch, Tue Dec 7 15:03:53 2004 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package javax.imageio.stream;  package javax.imageio.stream;
40    
41    import java.io.InputStream;
42    import java.io.IOException;
43    
44  /**  /**
45   * @author Michael Koch (konqueror@gmx.de)   * @author Michael Koch (konqueror@gmx.de)
46   */   */
47  public class MemoryCacheImageInputStream  public class MemoryCacheImageInputStream extends ImageInputStreamImpl
48  {  {
49      private InputStream stream;
50      
51      public MemoryCacheImageInputStream(InputStream stream)
52      {
53        this.stream = stream;
54      }
55    
56      public void close()
57        throws IOException
58      {
59        super.close();
60        stream.close();
61      }
62    
63      public void flushBefore(long position)
64        throws IOException
65      {
66        // FIXME: Implement me.
67        throw new Error("not implemented");
68      }
69    
70    public boolean isCached()    public boolean isCached()
71    {    {
72      return true;      return true;
# Line 57  public class MemoryCacheImageInputStream Line 81  public class MemoryCacheImageInputStream
81    {    {
82      return true;      return true;
83    }    }
84    
85      public int read()
86        throws IOException
87      {
88        setBitOffset(0);
89        return stream.read();
90      }
91    
92      public int read(byte[] data, int offset, int len)
93        throws IOException
94      {
95        setBitOffset(0);
96        return stream.read(data, offset, len);
97      }
98  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26