gnu.inet.ftp

Class FTPURLConnection


public class FTPURLConnection
extends URLConnection

An FTP URL connection.

Field Summary

protected FTPConnection
connection
The connection managing the protocol exchange.
protected int
fileStructure
protected boolean
passive
protected int
representationType
protected int
transferMode

Constructor Summary

FTPURLConnection(URL url)
Constructs an FTP connection to the specified URL.

Method Summary

void
addRequestProperty(String key, String value)
void
connect()
Establishes the connection.
InputStream
getInputStream()
Returns an input stream that reads from this open connection.
OutputStream
getOutputStream()
Returns an output stream that writes to this connection.
Map
getRequestProperties()
String
getRequestProperty(String key)
void
setDoInput(boolean doinput)
This connection supports doInput.
void
setDoOutput(boolean dooutput)
This connection supports doOutput.
void
setRequestProperty(String key, String value)

Field Details

connection

protected FTPConnection connection
The connection managing the protocol exchange.


fileStructure

protected int fileStructure


passive

protected boolean passive


representationType

protected int representationType


transferMode

protected int transferMode

Constructor Details

FTPURLConnection

public FTPURLConnection(URL url)
Constructs an FTP connection to the specified URL.

Parameters:
url - the URL

Method Details

addRequestProperty

public void addRequestProperty(String key,
                               String value)


connect

public void connect()
            throws IOException
Establishes the connection.


getInputStream

public InputStream getInputStream()
            throws IOException
Returns an input stream that reads from this open connection.


getOutputStream

public OutputStream getOutputStream()
            throws IOException
Returns an output stream that writes to this connection.


getRequestProperties

public Map getRequestProperties()


getRequestProperty

public String getRequestProperty(String key)


setDoInput

public void setDoInput(boolean doinput)
This connection supports doInput.


setDoOutput

public void setDoOutput(boolean dooutput)
This connection supports doOutput.


setRequestProperty

public void setRequestProperty(String key,
                               String value)


* FTPURLConnection.java * Copyright (C) 2003 The Free Software Foundation * * This file is part of GNU inetlib, a library. * * GNU inetlib is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNU inetlib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Linking this library statically or dynamically with other modules is * making a combined work based on this library. Thus, the terms and * conditions of the GNU General Public License cover the whole * combination. * * As a special exception, the copyright holders of this library give you * permission to link this library with independent modules to produce an * executable, regardless of the license terms of these independent * modules, and to copy and distribute the resulting executable under * terms of your choice, provided that you also meet, for each linked * independent module, the terms and conditions of the license of that * module. An independent module is a module which is not derived from * or based on this library. If you modify this library, you may extend * this exception to your version of the library, but you are not * obliged to do so. If you do not wish to do so, delete this * exception statement from your version.