private IOUtils() {
}
+ public static Charset getConsoleCharset() {
+ final var console = System.console();
+ return console == null ? Charset.defaultCharset() : console.charset();
+ }
+
public static String readAll(InputStream in, Charset charset) throws IOException {
var output = new StringWriter();
var buffer = new byte[4096];
logger.info("Listening on socket: " + address);
postBind(address);
} catch (IOException e) {
- throw new IOErrorException("Failed to bind socket: " + e.getMessage(), e);
+ throw new IOErrorException("Failed to bind socket " + address + ": " + e.getMessage(), e);
}
return serverChannel;
}