Tabnine Logo
FtpURLConnection.readLine
Code IndexAdd Tabnine to your IDE (free)

How to use
readLine
method
in
libcore.net.url.FtpURLConnection

Best Java code snippets using libcore.net.url.FtpURLConnection.readLine (Showing top 14 results out of 315)

origin: robovm/robovm

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;
}
origin: robovm/robovm

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));
  }
}
origin: MobiVM/robovm

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;
}
origin: FlexoVM/flexovm

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;
}
origin: ibinti/bugvm

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;
}
origin: com.bugvm/bugvm-rt

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;
}
origin: com.mobidevelop.robovm/robovm-rt

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;
}
origin: com.gluonhq/robovm-rt

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;
}
origin: MobiVM/robovm

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));
  }
}
origin: com.bugvm/bugvm-rt

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));
  }
}
origin: ibinti/bugvm

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));
  }
}
origin: com.mobidevelop.robovm/robovm-rt

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));
  }
}
origin: com.gluonhq/robovm-rt

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));
  }
}
origin: FlexoVM/flexovm

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));
  }
}
libcore.net.urlFtpURLConnectionreadLine

Javadoc

Read a line of text and return it for possible parsing

Popular methods of FtpURLConnection

  • <init>
    FtpURLConnection constructor.
  • cd
    Change the server directory to that specified in the URL
  • connect
    Establishes the connection to the resource specified by thisURL
  • connectInternal
  • getConnectTimeout
  • getDoInput
  • getFile
  • getReadTimeout
  • getReply
  • guessContentTypeFromName
  • login
  • port
  • login,
  • port,
  • readMultiLine,
  • sendFile,
  • setType,
  • write

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • JTextField (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now