org.apache.nutch.protocol.ftp

## Class FtpResponse

- java.lang.Object
- - org.apache.nutch.protocol.ftp.FtpResponse

-     public class FtpResponse
      extends java.lang.Object

  FtpResponse.java mimics ftp replies as http response. It tries its best to follow http's way for headers, response codes as well as exceptions. Comments: In this class, all FtpException*.java thrown by Client.java and some important commons-net exceptions passed by Client.java must have been properly dealt with. They'd better not be leaked to the caller of this class.
  Author:
    John Xing

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FtpResponse(java.net.URL url, WebPage page, Ftp ftp, Configuration conf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCode()` Returns the response code.
    `byte[]` | `getContent()`
    `java.lang.String` | `getHeader(java.lang.String name)` Returns the value of a named header.
    `Content` | `toContent()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FtpResponse

          public FtpResponse(java.net.URL url,
                             WebPage page,
                             Ftp ftp,
                             Configuration conf)
                      throws FtpException,
                             java.io.IOException

      Throws:
        `FtpException`
        `java.io.IOException`

  - ### Method Detail

    - #### getCode

          public int getCode()

      Returns the response code.

    - #### getHeader

          public java.lang.String getHeader(java.lang.String name)

      Returns the value of a named header.

    - #### getContent

          public byte[] getContent()

    - #### toContent

          public Content toContent()

Copyright © 2019 The Apache Software Foundation