List of usage examples for org.apache.commons.net.ftp FTPCmd ALLO
FTPCmd ALLO
To view the source code for org.apache.commons.net.ftp FTPCmd ALLO.
Click Source Link
From source file:com.atomicleopard.thundr.ftp.commons.FTP.java
/*** * A convenience method to send the FTP ALLO command to the server, * receive the reply, and return the reply code. * <p>/*from w w w . ja v a 2s. co m*/ * @param bytes The number of bytes to allocate. * @return The reply code received from the server. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. ***/ public int allo(int bytes) throws IOException { return sendCommand(FTPCmd.ALLO, Integer.toString(bytes)); }
From source file:com.atomicleopard.thundr.ftp.commons.FTP.java
/*** * A convenience method to send the FTP ALLO command to the server, * receive the reply, and return the reply code. * <p>// w w w. j av a 2 s . co m * @param bytes The number of bytes to allocate. * @param recordSize The size of a record. * @return The reply code received from the server. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. ***/ public int allo(int bytes, int recordSize) throws IOException { return sendCommand(FTPCmd.ALLO, Integer.toString(bytes) + " R " + Integer.toString(recordSize)); }