private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }
private int getReply() throws IOException { byte[] code = new byte[3]; for (int i = 0; i < code.length; i++) { final int tmp = ctrlInput.read(); if (tmp == -1) { throw new EOFException(); } code[i] = (byte) tmp; } replyCode = new String(code, 0, code.length, StandardCharsets.ISO_8859_1); boolean multiline = false; if (ctrlInput.read() == '-') { multiline = true; } readLine(); /* Skip the rest of the first line */ if (multiline) { while (readMultiLine()) {/* Read all of a multiline reply */ } } try { return Integer.parseInt(replyCode); } catch (NumberFormatException e) { throw (IOException)(new IOException("reply code is invalid").initCause(e)); } }