/[classpath]/inetlib/source/gnu/inet/gopher/DirectoryEntry.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/gopher/DirectoryEntry.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dog, Sun Oct 19 08:51:37 2003 UTC revision 1.2 by dog, Sun Oct 19 16:16:50 2003 UTC
# Line 41  import java.util.NoSuchElementException; Line 41  import java.util.NoSuchElementException;
41  public final class DirectoryEntry  public final class DirectoryEntry
42  {  {
43    
44          /**          /**
45           * Item is a file.           * Item is a file.
46           */           */
47          public static final int FILE = 0x30;    public static final int FILE = 0x30;
48    
49          /**          /**
50           * Item is a directory.           * Item is a directory.
51           */           */
52          public static final int DIRECTORY = 0x31;    public static final int DIRECTORY = 0x31;
53    
54          /**          /**
55           * Item is a CSO phone-book server.           * Item is a CSO phone-book server.
56           */           */
57          public static final int CSO_PHONE_BOOK = 0x32;    public static final int CSO_PHONE_BOOK = 0x32;
58    
59          /**          /**
60           * Error.           * Error.
61           */           */
62          public static final int ERROR = 0x33;    public static final int ERROR = 0x33;
63    
64          /**          /**
65           * Item is a BinHex Macintosh file.           * Item is a BinHex Macintosh file.
66           */           */
67          public static final int BINHEX = 0x34;    public static final int BINHEX = 0x34;
68    
69          /**          /**
70           * Item is a DOS binary archive of some sort.           * Item is a DOS binary archive of some sort.
71           */           */
72          public static final int DOS_ARCHIVE = 0x35;    public static final int DOS_ARCHIVE = 0x35;
73    
74          /**          /**
75           * Item is a UNIX uuencoded file.           * Item is a UNIX uuencoded file.
76           */           */
77          public static final int UUENCODED = 0x36;    public static final int UUENCODED = 0x36;
78    
79          /**          /**
80           * Item is an Index-Search server.           * Item is an Index-Search server.
81           */           */
82          public static final int INDEX_SEARCH = 0x37;    public static final int INDEX_SEARCH = 0x37;
83    
84          /**          /**
85           * Item points to a text-based Telnet session.           * Item points to a text-based Telnet session.
86           */           */
87          public static final int TELNET = 0x38;    public static final int TELNET = 0x38;
88    
89          /**          /**
90           * Item is a binary file.           * Item is a binary file.
91           */           */
92          public static final int BINARY = 0x39;    public static final int BINARY = 0x39;
93    
94          /**          /**
95           * Item is a redundant server.           * Item is a redundant server.
96           */           */
97          public static final int REDUNDANT = 0x2b;    public static final int REDUNDANT = 0x2b;
98    
99          /**          /**
100           * Item points to a text-based tn3270 session.           * Item points to a text-based tn3270 session.
101           */           */
102          public static final int TN3270 = 0x54;    public static final int TN3270 = 0x54;
103    
104          /**          /**
105           * Item is a GIF format graphics file.           * Item is a GIF format graphics file.
106           */           */
107          public static final int GIF = 0x67;    public static final int GIF = 0x67;
108    
109          /**          /**
110           * Item is some kind of image file.           * Item is some kind of image file.
111           */           */
112          public static final int IMAGE = 0x49;    public static final int IMAGE = 0x49;
113    
114          final int type;    final int type;
115          final String title;    final String title;
116          final String selector;    final String selector;
117          final String hostname;    final String hostname;
118          final int port;    final int port;
119    
120          DirectoryEntry(int type, String title, String selector, String hostname, int port)      DirectoryEntry(int type, String title, String selector, String hostname,
121          {                     int port)
122                  this.type = type;    {
123                  this.title = title;      this.type = type;
124                  this.selector = selector;      this.title = title;
125                  this.hostname = hostname;      this.selector = selector;
126                  this.port = port;      this.hostname = hostname;
127          }      this.port = port;
128      }
129    
130          /**          /**
131           * Returns the type of this entry.           * Returns the type of this entry.
132           */           */
133          public int getType()    public int getType()
134          {    {
135                  return type;      return type;
136          }    }
137    
138          /**          /**
139           * Returns the title for this entry.           * Returns the title for this entry.
140           */           */
141          public String getTitle()    public String getTitle()
142          {    {
143                  return title;      return title;
144          }    }
145    
146          /**          /**
147           * Returns the selector for this entry.           * Returns the selector for this entry.
148           * This is used to retrieve the content for the entry.           * This is used to retrieve the content for the entry.
149           */           */
150          public String getSelector()    public String getSelector()
151          {    {
152                  return selector;      return selector;
153          }    }
154    
155          /**          /**
156           * Returns the hostname for the content of this entry.           * Returns the hostname for the content of this entry.
157           */           */
158          public String getHostname()    public String getHostname()
159          {    {
160                  return hostname;      return hostname;
161          }    }
162    
163          /**          /**
164           * Returns the port on which the content for this entry can be retrieved.           * Returns the port on which the content for this entry can be retrieved.
165           */           */
166          public int getPort()    public int getPort()
167          {    {
168                  return port;      return port;
169          }    }
170    
171  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26