private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
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 boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
private boolean readMultiLine() throws IOException { String line = readLine(); if (line.length() < 4) { return true; } if (line.substring(0, 3).equals(replyCode) && (line.charAt(3) == (char) 32)) { return false; } return true; }
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)); } }