gnu.java.net.protocol.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

Fields inherited from class java.net.URLConnection

allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches

Constructor Summary

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

Method Summary

Map
List> getRequestProperties()
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.
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)

Methods inherited from class java.net.URLConnection

addRequestProperty, connect, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

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

List> getRequestProperties

public MapList> getRequestProperties()

addRequestProperty

public void addRequestProperty(String key,
                               String value)
Overrides:
addRequestProperty in interface URLConnection

connect

public void connect()
            throws IOException
Establishes the connection.
Overrides:
connect in interface URLConnection

getInputStream

public InputStream getInputStream()
            throws IOException
Returns an input stream that reads from this open connection.
Overrides:
getInputStream in interface URLConnection

getOutputStream

public OutputStream getOutputStream()
            throws IOException
Returns an output stream that writes to this connection.
Overrides:
getOutputStream in interface URLConnection

getRequestProperty

public String getRequestProperty(String key)
Overrides:
getRequestProperty in interface URLConnection

setDoInput

public void setDoInput(boolean doinput)
This connection supports doInput.
Overrides:
setDoInput in interface URLConnection

setDoOutput

public void setDoOutput(boolean dooutput)
This connection supports doOutput.
Overrides:
setDoOutput in interface URLConnection

setRequestProperty

public void setRequestProperty(String key,
                               String value)
Overrides:
setRequestProperty in interface URLConnection

FTPURLConnection.java -- Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath 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, or (at your option) any later version. GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 obligated to do so. If you do not wish to do so, delete this exception statement from your version.