diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-03-13 18:16:29 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-03-13 18:16:29 -0400 |
commit | 50085d74abeb8fd53901419f91a0874222e9e6df (patch) | |
tree | 4dc3e45f047e3b8bc2b84b8baa460bce6879f36b | |
parent | 2c9c848ae275705ce315b6061cd06640834c9d9d (diff) |
tidy
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | dslog/Read.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..17db575 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +https://www.chiefdelphi.com/forums/showthread.php?t=104689 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; } } |