/[classpath]/classpath/java/io/InputStreamReader.java
ViewVC logotype

Diff of /classpath/java/io/InputStreamReader.java

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

revision 1.11 by mkoch, Fri May 9 13:30:35 2003 UTC revision 1.12 by mkoch, Wed Jun 11 17:21:27 2003 UTC
# Line 138  public class InputStreamReader extends R Line 138  public class InputStreamReader extends R
138    public void close() throws IOException    public void close() throws IOException
139    {    {
140      in.close();      in.close();
141        in = null;
142    }    }
143    
144    /**    /**
# Line 149  public class InputStreamReader extends R Line 150  public class InputStreamReader extends R
150     */     */
151    public String getEncoding()    public String getEncoding()
152    {    {
153      return(in.getSchemeName());      return in.getSchemeName();
154    }    }
155    
156    /**    /**
# Line 165  public class InputStreamReader extends R Line 166  public class InputStreamReader extends R
166     */     */
167    public boolean ready() throws IOException    public boolean ready() throws IOException
168    {    {
169      return(in.ready());      if (in == null)
170          throw new IOException("Reader has been closed");
171        
172        return in.ready();
173    }    }
174    
175    /**    /**
# Line 183  public class InputStreamReader extends R Line 187  public class InputStreamReader extends R
187     */     */
188    public int read (char[] buf, int offset, int length) throws IOException    public int read (char[] buf, int offset, int length) throws IOException
189    {    {
190        if (in == null)
191          throw new IOException("Reader has been closed");
192        
193      return in.read(buf, offset, length);      return in.read(buf, offset, length);
194    }    }
195    
# Line 195  public class InputStreamReader extends R Line 202  public class InputStreamReader extends R
202     */     */
203    public int read() throws IOException    public int read() throws IOException
204    {    {
205      return(in.read());      if (in == null)
206          throw new IOException("Reader has been closed");
207        
208        return in.read();
209      }
210    
211       /**
212        * Skips the specified number of chars in the stream.  It
213        * returns the actual number of chars skipped, which may be less than the
214        * requested amount.
215        *
216        * @param num_chars The requested number of chars to skip
217        *
218        * @return The actual number of chars skipped.
219        *
220        * @exception IOException If an error occurs
221        */
222       public long skip(long count) throws IOException
223       {
224         if (in == null)
225           throw new IOException("Reader has been closed");
226        
227         return super.skip(count);
228    }    }
229    
230  } // class InputStreamReader  } // class InputStreamReader

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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