< prev index next >

src/java.base/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java

Print this page

        

@@ -66,17 +66,18 @@
  * <LI>Login</LI>
  * <LI>Get (or Put) the file</LI>
  * <LI>Disconnect</LI>
  * </UL>
  * You should not have to use it directly in most cases because all will be handled
- * in a abstract layer. Here is an example of how to use the class :
- * <P>
- * <code>URL url = new URL("ftp://ftp.sun.com/pub/test.txt");<p>
- * UrlConnection con = url.openConnection();<p>
- * InputStream is = con.getInputStream();<p>
- * ...<p>
- * is.close();</code>
+ * in a abstract layer. Here is an example of how to use the class:
+ * <pre>{@code
+ * URL url = new URL("ftp://ftp.sun.com/pub/test.txt");
+ * UrlConnection con = url.openConnection();
+ * InputStream is = con.getInputStream();
+ * ...
+ * is.close();
+ * }</pre>
  *
  * @see sun.net.ftp.FtpClient
  */
 public class FtpURLConnection extends URLConnection {
 

@@ -156,11 +157,11 @@
     }
 
     /**
      * Creates an FtpURLConnection from a URL.
      *
-     * @param   url     The <code>URL</code> to retrieve or store.
+     * @param   url     The {@code URL} to retrieve or store.
      */
     public FtpURLConnection(URL url) {
         this(url, null);
     }
 

@@ -380,11 +381,11 @@
 
     /**
      * Get the InputStream to retreive the remote file. It will issue the
      * "get" (or "dir") command to the ftp server.
      *
-     * @return  the <code>InputStream</code> to the connection.
+     * @return  the {@code InputStream} to the connection.
      *
      * @throws  IOException if already opened for output
      * @throws  FtpProtocolException if errors occur during the transfert.
      */
     @Override

@@ -493,11 +494,11 @@
 
     /**
      * Get the OutputStream to store the remote file. It will issue the
      * "put" command to the ftp server.
      *
-     * @return  the <code>OutputStream</code> to the connection.
+     * @return  the {@code OutputStream} to the connection.
      *
      * @throws  IOException if already opened for input or the URL
      *          points to a directory
      * @throws  FtpProtocolException if errors occur during the transfert.
      */

@@ -546,13 +547,13 @@
     String guessContentTypeFromFilename(String fname) {
         return guessContentTypeFromName(fname);
     }
 
     /**
-     * Gets the <code>Permission</code> associated with the host & port.
+     * Gets the {@code Permission} associated with the host and port.
      *
-     * @return  The <code>Permission</code> object.
+     * @return  The {@code Permission} object.
      */
     @Override
     public Permission getPermission() {
         if (permission == null) {
             int urlport = url.getPort();

@@ -566,11 +567,11 @@
     /**
      * Sets the general request property. If a property with the key already
      * exists, overwrite its value with the new value.
      *
      * @param   key     the keyword by which the request is known
-     *                  (e.g., "<code>accept</code>").
+     *                  (e.g., "{@code accept}").
      * @param   value   the value associated with it.
      * @throws IllegalStateException if already connected
      * @see #getRequestProperty(java.lang.String)
      */
     @Override
< prev index next >