From dfa163e5a3cffa46f0241210f2c8be1f8e298d7a Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 4 Feb 2022 22:54:22 +0800 Subject: Add psmb support. --- .../keuin/psmb4j/util/error/SocketClosedException.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java (limited to 'src/main/java/com/keuin/psmb4j/util/error/SocketClosedException.java') 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)); + } +} -- cgit v1.2.3