/[classpath]/inetlib/source/gnu/inet/nntp/ArticleStream.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/nntp/ArticleStream.java

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

revision 1.5 by dog, Thu Oct 21 15:21:55 2004 UTC revision 1.6 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * ArticleStream.java
3   * Copyright (C) 2002 The Free Software Foundation   * Copyright (C) 2002 The Free Software Foundation
4   *   *
5   * This file is part of GNU inetlib, a library.   * This file is part of GNU inetlib, a library.
# Line 46  import java.io.IOException; Line 46  import java.io.IOException;
46   * A stream that can be told to read to the end of its data.   * A stream that can be told to read to the end of its data.
47   *   *
48   * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>   * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
  * @version $Revision$ Date$  
49   */   */
50  public final class ArticleStream  public final class ArticleStream
51    extends FilterInputStream implements PendingData    extends FilterInputStream
52      implements PendingData
53  {  {
54    
55    ArticleStream (InputStream in)    ArticleStream(InputStream in)
56    {    {
57      super (in);      super(in);
58    }    }
59    
60    /**    /**
61     * Read to the end of the article data.     * Read to the end of the article data.
62     */     */
63    public void readToEOF () throws IOException    public void readToEOF()
64        throws IOException
65    {    {
66      if (in.available () == 0)      if (in.available() == 0)
67        {        {
68          return;          return;
69        }        }
# Line 70  public final class ArticleStream Line 71  public final class ArticleStream
71      int ret = 0;      int ret = 0;
72      while (ret != -1)      while (ret != -1)
73        {        {
74          ret = in.read (buf);          ret = in.read(buf);
75        }        }
76    }    }
77    
78  }  }
79    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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