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

Diff of /classpath/java/io/DataInputStream.java

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

revision 1.28 by jfrijters, Mon Mar 7 13:50:45 2005 UTC revision 1.29 by rabbit78, Wed Jun 15 15:18:42 2005 UTC
# Line 361  public class DataInputStream extends Fil Line 361  public class DataInputStream extends Fil
361              int next_c = in.read();              int next_c = in.read();
362              if (next_c != '\n' && next_c != -1)              if (next_c != '\n' && next_c != -1)
363                {                {
364                  if (! (in instanceof PushbackInputStream))                  if (in instanceof BufferedInputStream)
365                      in = new PushbackInputStream(in);                    {
366                  ((PushbackInputStream) in).unread(next_c);                          BufferedInputStream bin = (BufferedInputStream) in;
367                            if (bin.pos > 0)
368                          bin.pos--;
369                      }
370                    else if (in instanceof StringBufferInputStream)
371                      {
372                            StringBufferInputStream bin = (StringBufferInputStream) in;
373                            if (bin.pos > 0)
374                          bin.pos--;
375                      }
376                    else if (in instanceof ByteArrayInputStream)
377                      {
378                        ByteArrayInputStream bin = (ByteArrayInputStream) in;
379                        if (bin.pos > 0)
380                          bin.pos--;
381                      }
382                    else
383                      {
384                        if (! (in instanceof PushbackInputStream))
385                          in = new PushbackInputStream(in);
386                        ((PushbackInputStream) in).unread(next_c);
387                      }
388                }                }
389              break;              break;
390            }            }

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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