Package org.apache.nutch.protocol.ftp
Class FtpResponse
java.lang.Object
org.apache.nutch.protocol.ftp.FtpResponse
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.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FtpResponse
public FtpResponse(URL url, CrawlDatum datum, Ftp ftp, Configuration conf) throws FtpException, IOException - Throws:
FtpExceptionIOException
-
-
Method Details
-
getCode
public int getCode()Get the response code.- Returns:
- the int response code
-
getHeader
Returns the value of a named header.- Parameters:
name- header key to retrieve a value for- Returns:
- the header value
-
getContent
public byte[] getContent() -
toContent
-