diff options
author | Keuin <[email protected]> | 2022-02-04 22:54:22 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-02-04 22:54:22 +0800 |
commit | dfa163e5a3cffa46f0241210f2c8be1f8e298d7a (patch) | |
tree | 72db589d79bcc3bbca45c3a34a6dac71b2f55526 /src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java | |
parent | 12ddbba66e6f2585e59d05d1782c0e8ce9fe6146 (diff) |
Add psmb support.
Diffstat (limited to 'src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java')
-rw-r--r-- | src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java b/src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java new file mode 100644 index 0000000..e7c9b2d --- /dev/null +++ b/src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java @@ -0,0 +1,15 @@ +package com.keuin.psmb4j.util.error; + +import java.io.IOException; + +/** + * The socket closed before enough bytes have been read out. + */ +public class SocketClosedException extends IOException { + public SocketClosedException() { + } + + public SocketClosedException(long expected, long actual) { + super(String.format("expected %d bytes, EOF after reading %d bytes", expected, actual)); + } +} |