KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > vfs > provider > url > UrlFileName


1 package org.apache.commons.vfs.provider.url;
2
3 import org.apache.commons.vfs.FileType;
4 import org.apache.commons.vfs.provider.URLFileName;
5
6 /**
7  * Created by IntelliJ IDEA.
8  * User: im
9  * Date: 28.06.2005
10  * Time: 16:00:19
11  * To change this template use File | Settings | File Templates.
12  */

13 public class UrlFileName extends URLFileName
14 {
15     public UrlFileName(final String JavaDoc scheme, final String JavaDoc hostName, final int port, final int defaultPort, final String JavaDoc userName, final String JavaDoc password, final String JavaDoc path, final FileType type, final String JavaDoc queryString)
16     {
17         super(scheme, hostName, port, defaultPort, userName, password, path, type, queryString);
18     }
19
20     protected void appendRootUri(final StringBuffer JavaDoc buffer)
21     {
22         if (getHostName() != null && !"".equals(getHostName()))
23         {
24             super.appendRootUri(buffer);
25             return;
26         }
27
28         buffer.append(getScheme());
29         buffer.append(":");
30     }
31 }
32
Popular Tags