KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > imageio > plugins > common > InputStreamAdapter


1 /*
2  * @(#)InputStreamAdapter.java 1.11 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.imageio.plugins.common;
9
10 import java.io.IOException JavaDoc;
11 import java.io.InputStream JavaDoc;
12 import javax.imageio.stream.ImageInputStream JavaDoc;
13
14 /**
15  * @version 0.5
16  */

17 public class InputStreamAdapter extends InputStream JavaDoc {
18     
19     ImageInputStream JavaDoc stream;
20
21     public InputStreamAdapter(ImageInputStream JavaDoc stream) {
22         super();
23
24         this.stream = stream;
25     }
26
27     public int read() throws IOException JavaDoc {
28         return stream.read();
29     }
30
31     public int read(byte b[], int off, int len) throws IOException JavaDoc {
32         return stream.read(b, off, len);
33     }
34 }
35
Popular Tags