Mercurial Hosting > luan
annotate src/goodjava/rpc/FixedLengthInputStream.java @ 1490:9a2a2181a58f
FixedLengthInputStream
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 02 May 2020 20:42:28 -0600 |
parents | 27efb1fcbcb5 |
children | 491b355acef7 |
rev | line source |
---|---|
1402
27efb1fcbcb5
move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents:
1118
diff
changeset
|
1 package goodjava.rpc; |
1118 | 2 |
3 import java.io.InputStream; | |
4 import java.io.FilterInputStream; | |
5 import java.io.IOException; | |
6 import java.io.EOFException; | |
7 | |
8 | |
1490
9a2a2181a58f
FixedLengthInputStream
Franklin Schmidt <fschmidt@gmail.com>
parents:
1402
diff
changeset
|
9 final class FixedLengthInputStream extends goodjava.io.FixedLengthInputStream { |
1118 | 10 |
11 public FixedLengthInputStream(InputStream in,long len) { | |
1490
9a2a2181a58f
FixedLengthInputStream
Franklin Schmidt <fschmidt@gmail.com>
parents:
1402
diff
changeset
|
12 super(in,len); |
1118 | 13 } |
14 | |
15 public void close() throws IOException { | |
16 while( left > 0 ) { | |
17 if( skip(left) == 0 ) | |
18 throw new EOFException(); | |
19 } | |
20 } | |
21 | |
22 } |