38 |
* @version $Revision$ Date$ |
* @version $Revision$ Date$ |
39 |
*/ |
*/ |
40 |
public final class ArticleStream |
public final class ArticleStream |
41 |
extends FilterInputStream |
extends FilterInputStream implements PendingData |
|
implements PendingData |
|
42 |
{ |
{ |
43 |
|
|
44 |
ArticleStream(InputStream in) |
ArticleStream(InputStream in) |
45 |
{ |
{ |
46 |
super(in); |
super(in); |
49 |
/** |
/** |
50 |
* Read to the end of the article data. |
* Read to the end of the article data. |
51 |
*/ |
*/ |
52 |
public void readToEOF() |
public void readToEOF() throws IOException |
|
throws IOException |
|
53 |
{ |
{ |
54 |
if (in.available()==0) |
if (in.available() == 0) |
55 |
return; |
return; |
56 |
byte[] buf = new byte[4096]; |
byte[] buf = new byte[4096]; |
57 |
int ret = 0; |
int ret = 0; |
58 |
while (ret!=-1) |
while (ret != -1) |
59 |
ret = in.read(buf); |
ret = in.read(buf); |
60 |
} |
} |
61 |
|
|
62 |
} |
} |