summaryrefslogtreecommitdiff
path: root/dslog/Read.java
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-03-13 18:16:29 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-03-13 18:16:29 -0400
commit50085d74abeb8fd53901419f91a0874222e9e6df (patch)
tree4dc3e45f047e3b8bc2b84b8baa460bce6879f36b /dslog/Read.java
parent2c9c848ae275705ce315b6061cd06640834c9d9d (diff)
tidy
Diffstat (limited to 'dslog/Read.java')
-rw-r--r--dslog/Read.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/dslog/Read.java b/dslog/Read.java
index 04537d5..ba5bcde 100644
--- a/dslog/Read.java
+++ b/dslog/Read.java
@@ -5,14 +5,16 @@ import java.io.InputStream;
import java.io.IOException;
import java.io.EOFException;
import java.time.Instant;
+import java.util.NoSuchElementException;
class Read {
public static void full(InputStream in, byte b[]) throws IOException {
int n = 0;
while (n < b.length) {
int count = in.read(b, n, b.length - n);
- if (count < 0)
+ if (count < 0) {
throw new EOFException();
+ }
n += count;
}
}