Skip to content

Commit 3b2ca19

Browse files
author
Jeffrey Brekke
committed
Initial revision
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/net/trunk@139272 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1441f4d commit 3b2ca19

File tree

110 files changed

+22393
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+22393
-0
lines changed

CHANGES

Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,315 @@
1+
version 1.3.8
2+
o Works with Java 1.2
3+
4+
version 1.3.7
5+
o NetComponents.jar file is now compressed and includes an
6+
auto-generated manifest so that it may be used with the HotJava
7+
web browser.
8+
9+
o Fixed a date parsing bug in DefaultFTPFileListeParser. Months
10+
would not always be properly converted (e.g., April would turn
11+
up as August). We must have inadvertently introduced this bug with
12+
release 1.3, when we rewrote DefaultFTPFileListParser. We're really
13+
sorry for goofing that up.
14+
15+
o Added isConversionRequired() static final method to
16+
com.oroinc.io.FromNetASCIIInputStream.
17+
18+
o Fixed a bug whereby the InputStream returned by
19+
TelnetClient.getInputStream might return an incorrect available()
20+
value. Also added documentation to the FromNetASCIIInputStream
21+
available() method indicating that its return value is unreliable.
22+
In other words, you can rely on the available() value returned by
23+
the TelnetClient InputStream, but you can't rely on the
24+
FromNetASCIIInputStream available() value.
25+
26+
version 1.3.6
27+
o added SocketFactory and DatagramSocketFactory interfaces as well
28+
as DefaultSocketFactory and DefaultDatagramSocketFactory classes to
29+
the com.oroinc.net package. Also added setSocketFactory and
30+
setDatagramSocketFactory methods to SocketClient and
31+
DatagramSocketClient respectively. This new functionality allows
32+
you to use your own SSL sockets with any of the NetComponents
33+
classes, request browser capabilities in an applet before creating
34+
a socket, and other customizations dependent on the ability to
35+
control the Socket creation process.
36+
37+
o added setRemoteVerificationEnabled(boolean) and
38+
isRemoteVerificationEnabled()methods to FTPClient and RExecClient
39+
so that you may disable the host-based incoming connection security
40+
check when behind a proxy or firewall.
41+
42+
o Fixed a bug in com.oroinc.net.tftp.TFTPRequestPacket whereby the
43+
TFTPRequestPacket(int, DatagramPacket) constructor would not
44+
properly parse out the transfer mode. This was only an issue
45+
for people writing TFTP servers using the TFTP package.
46+
47+
o Implemented setting of FTPFile raw listing so that getRawListing()
48+
will no longer just return null. At some point after changing
49+
DefaultFTPListPaser, the raw listing of FTPFile was no longer being
50+
set. This error is now corrected.
51+
52+
o Removed the final keyword from the declaration of FTPClient,
53+
NNTPClient, SMTPClient, POP3Client, and TFTPClient so that
54+
programmers may derive subclasses rather than use aggregation
55+
to extend functionality.
56+
57+
version 1.3.5
58+
o Added ProtocolCommandEvent, ProtocolCommandListener, and
59+
ProtocolCommandSupport classes to com.oroinc.net to facilitate
60+
the interception of command/reply traffic from protocols that rely
61+
on text commands, including FTP, SMTP, NNTP, and POP3. Some of the
62+
example programs, including ftp.java and mail.java demonstrate how
63+
to register a ProtocolCommandListener, using the example
64+
PrintCommandListener class.
65+
66+
o Modified reply parsing code in SMTP, FTP, and NNTP classes to
67+
handle server replies consisting of only a 3 digit reply code.
68+
The various RFC's are ambiguous as to whether these kinds of replies
69+
are legal, but since some servers produce them, NetComponents will
70+
handle them.
71+
72+
o Made com.oroinc.net.ftp.FTPFile implement the Serializable
73+
interface so that the NetComponents Pro FTP bean may be properly
74+
serialized.
75+
76+
version 1.3
77+
o Added com.oroinc.net.bsd package which includes new RExecClient,
78+
RCommandClient, and RLoginClient classes which implement
79+
BSD Unix rexec(), rcmd() (rshell), and rlogin functionality.
80+
81+
o Added rexec.java, rshell.java, and rlogin.java example programs
82+
83+
o Common reader/writer thread behavior shared by weatherTelnet,
84+
rexec, rshell, and rlogin examples moved into IOUtil class in
85+
examples directory.
86+
87+
o Added verifyRemote() convenience method to SocketClient for making
88+
it easier to verify that the remote end of a socket is the same
89+
as the host the SocketClient is connected to. This is used for
90+
verifying things like rexec() error stream connections and FTP
91+
data connections.
92+
93+
o Enhanced performance of DefaultFTPFileListParser and also made
94+
it better able to handle unusual variations of the "default"
95+
listing format. This was prompted by not being able to list an
96+
ftp site that had the following entry:
97+
drwxrwsr-x1170 18280 25051 34304 Jan 31 22:36 faq
98+
99+
There was no whitespace between the permissions field and the
100+
hard link count. The new parser can deal with this situation.
101+
102+
version 1.2.6
103+
Fixed bug in SimpleSMTPHeader which would add an extra blank line
104+
between headers added with addHeaderField() and the default headers
105+
from the constructor.
106+
107+
version 1.2.5
108+
o Due to developer requests, changed the behavior of FTPClient
109+
enterLocalPassiveMode(). Up to now, enterLocalPassiveMode()
110+
would issue a PASV command to the server immediately, and you would
111+
have to call enterLocalPassiveMode manually before every
112+
file transfer or other operation requiring a data connection.
113+
Now enterLocalPassiveMode() has been changed to not issue a PASV
114+
command to the server immediately. If you wish to do this, you
115+
should use the pasv() command in the FTP class. Now you only have
116+
to call enterLocalPassiveMode() once, and from then on FTPClient
117+
will automatically issue PASV commands to the server before opening
118+
a data connection. To return to normal mode, you only have to call
119+
enterLocalActiveMode(). Because of this change,
120+
enterLocalPassiveMode() now is of type void and doesn't throw any
121+
exceptions. You may have to make some changes to existing code.
122+
Additionally, getPassiveHost() and getPassivePort() now only return
123+
valid data AFTER the first data connection has been established in
124+
passive mode since enterLocalPassiveMode() no longer issues a
125+
PASV command immediately, but rather causes PASV commands to be
126+
automatically sent before the opening of all future data connections.
127+
128+
o Added CopyStreamEvent, CopyStreamListener, and CopyStreamAdapter
129+
support classes that are required by NetComponents Pro to track the
130+
progress of file transfer operations using the Util copyStream()
131+
methods.
132+
133+
o Changed com.oroinc.io.Util copyStream and copyReader methods to
134+
return a long value instead of int for number of bytes copied. This
135+
was previously reported to have been done for version 1.2.3, but the
136+
change really hadn't been made.
137+
138+
o Added com.oroinc.io.CopyStreamException and changed
139+
changed com.oroinc.io.Util copyStream and copyReader methods to throw
140+
CopyStreamException. CopyStreamException stores the number of bytes
141+
confirmed to have been transferred before the throwing of an
142+
IOException. It also stores the original IOException responsible for
143+
the failure of a complete copy.
144+
145+
o storeFile, retrieveFile, appendFile, and storeUniqueFile in
146+
FTPClient now can also throw a CopyStreamException. No changes
147+
in existing code are necessary since CopyStreamException is a
148+
subclass of IOException. The only point in doing this is so that
149+
you may retrieve the number of bytes transferred before failure.
150+
151+
o Relaxed the multi-line reply parsing code in the FTP class to
152+
handle non-conformant FTP servers. For example, the FTP server
153+
running on ftp.funet.fi ends a 426 multi-line reply with a line
154+
starting with 226 rather than 426. Previously this would cause
155+
the FTP and FTPClient classes to block indefinitely waiting for
156+
the correctly formatted multi-line reply ending. This was further
157+
complicated by the fact that the multi-line reply ending
158+
detection was already relaxed to handle other non-conformant
159+
FTP servers. Right now all deviations from RFC 959 that we have
160+
encountered are handled.
161+
162+
o Changed write(byte b[], int offset, int length) in
163+
SocketOutputStream and FromNetASCIIOutputStream to bypass the
164+
equivalent method in FilterOutputStream because the
165+
FilterOutputStream method is very inefficient. The change was
166+
made after noticing that FTP file uploads were noticeably slower
167+
than downloads and tracing the bottleneck to FilterOutputStream.
168+
169+
o Adjusted DefaultFTPFileLister to handle block and character
170+
device listings which include major and minor device numbers.
171+
172+
version 1.2.4
173+
o Included class files in a jar file called NetComponents.jar so
174+
that Macintosh developers may use the classes without problems
175+
resulting from the MacOS 32 character filename limit.
176+
177+
o Adjusted ftp.java example to be more correct. Added a call to
178+
ftp.quit() in case of login failure rather than disconnecting
179+
outright. It is more polite to send the FTP QUIT command to
180+
the server before disconnecting.
181+
182+
o Fixed bug in a support class for TelnetClient that could cause
183+
deadlock in unusual cases. For example, if FTPClient tried to
184+
call disconnect() without calling quit() first, deadlock could
185+
have happened in the past because the TelnetClient input stream
186+
reader thread would be blocked holding a lock on the stream when
187+
trying to read while the thread calling disconnect() would be
188+
trying to close the stream, blocking while trying to acquire the
189+
lock. The correct solution was to not make the close synchronized.
190+
191+
version 1.2.3
192+
o Reimplemented workaround for Linux JDK bug. It turns out that
193+
users of Solaris x86, FreeBSD, and other x86 Unix implementations
194+
using a port of the Sun JDK may be experiencing the same bug. We
195+
finally got to the root of the problem and provided a new workaround
196+
which doesn't break anything, unlike our previous workaround. You
197+
should remove the old workaround if installed and use the new one.
198+
199+
o TelnetClient spawns a thread to handle asynchronous events. Fixed
200+
a bug where the priority assigned to that thread might be invalid
201+
in some cases.
202+
203+
o Changed FTPFile getSize() and setSize() methods to return and
204+
accept a long value respectively instead of an int to accomodate
205+
very large file sizes.
206+
207+
o Slightly improved performance of DefaultFTPListParser so very
208+
large directory listings will be parsed more quickly.
209+
210+
version 1.2.2
211+
o Fixed small bug in DefaultFTPListParser which would truncate the
212+
last letter of a filename that contained spaces and also the last
213+
letter of the value stored for FTPFile getSymbolicLink()
214+
215+
o Corrected the comment of server2serverFTP.java example to reflect
216+
that the second host argument should be the host running the program
217+
in most cases.
218+
219+
o Made an additional fix to InetAddress for BlackDown Linux JDK
220+
users. Our workaround fix for the Linux bug had caused an additional
221+
problem when InetAddress.getByName() was used, which would break
222+
some of the example programs on Linux.
223+
224+
version 1.2.1
225+
o Fixed small bug in DefaultFTPListParser which would set the
226+
year in the date of FTPFile to a year earlier for some files
227+
depending on the FTP server. The year should always be correct
228+
now.
229+
230+
version 1.2
231+
o Added the SMTP package and mail.java example
232+
233+
o Minor performance improvements in FTP, NNTP, and POP3 packages
234+
235+
version 1.1.1
236+
o Added some robustness features to FTP, NNTP, and POP3 classes.
237+
Specifically, added more lenient handling of malformed server
238+
replies and worked around a bug/limitation of the BufferedReader
239+
readLine() method. There are enough RFC non-compliant servers out
240+
there that it was necessary to try to accommodate them as best
241+
as possible.
242+
243+
version 1.1
244+
o Added com.oroinc.net.nntp NNTP package. See the new
245+
newsgroup.java and post.java examples as well as API documentation.
246+
247+
o Added com.oroinc.net.MalformedServerReplyException which most
248+
of the IETF protocol client classes will throw when receiving
249+
uninterpretable replies from the server. The exception is a
250+
subclass of IOException, and therefore does not require you to
251+
change existing code. However, if you are trying to develop a
252+
robust fault-tolerant application, you will want to test for
253+
this exception so your program can recover from the error.
254+
255+
o Removed com.oroinc.net.pop3.POP3MessageReader and replaced with
256+
the more general com.oroinc.io.DotTerminatedMessageReader. Code
257+
written using version 1.0 that specifically refers to
258+
POP3MessageReader must be changed.
259+
260+
o Added com.oroinc.io.DotTerminatedMessageWriter which is used by
261+
the NNTP and SMTP packages
262+
263+
o Restructured telnet package. TelnetClient is no longer usable
264+
as an active object. You interact with it solely through its
265+
input and output streams. The inner classes that caused problems
266+
on the Microsoft Java SDK have been removed. See new weatherTelnet
267+
example to see how to use the telnet functionality.
268+
269+
o Added setting of timeouts to example programs
270+
271+
o Added setDataTimeout method to FTPClient so that the timeout
272+
on a data connection can be set.
273+
274+
o Added com.oroinc.ftp.FTPConnectionClosedException which is now
275+
thrown by FTP command methods if an FTP 421 reply (service not
276+
available, connection closed) is received in a reply. This exception
277+
is a subclass of IOException and consequently will not break any
278+
existing code. However, you may now specifically catch
279+
FTPConnectionClosedException to detect a server disconnect caused by
280+
client idle activity or some other reason.
281+
282+
o Added pluggable FTP file listing parser. You can now subclass
283+
FTPFile and provide your own implementation of the FTPFileListParser
284+
interface to parse unique file listing formats. The new class
285+
DefaultFTPFileListParser provides a default implementation compatible
286+
with most FTP server listing formats. Also changed the default list
287+
parser to handle the common "total xx" listing prefix in non-English
288+
servers (essentially, any single-line listing prefix is now accepted).
289+
290+
o Significantly changed FingerClient and WhoisClient. FingerClient
291+
now subclasses SocketClient and WhoisClient subclasses
292+
FingerClient. This makes the classes more flexible and consistent
293+
with the rest of the package. It will break old code, but the
294+
necessary code changes are very easy to make. See finger.java and
295+
fwhois.java examples and compare to old.
296+
297+
o Removed _getInputStream_() and _getOutputStream_() protected
298+
methods from SocketClient. They are superfluous. Instead,
299+
customization of connection streams should be peformed in
300+
_connectAction_().
301+
302+
version 1.0.1
303+
o retrieveFileStream was inadvertently left out of
304+
com.oroinc.net.ftp.FTPClient and its javadoc comments were
305+
listed for storeFile in version 1.0. This has been fixed.
306+
retrieveFileStream is back in version 1.0.1 and the comments
307+
are correct.
308+
309+
o The documentation for listFiles and listNames was in error in
310+
version 1.0. These methods return null if no files are found.
311+
The original documentation erroneously stated that a zero length
312+
array would be returned for an empty directory. The documentation
313+
has been changed in 1.0.1 to reflect the actual behavior, which is
314+
to return null.
315+

COPYRIGHT

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
NetComponents Internet Protocol Library
2+
Copyright (C) 1997-2002 Daniel F. Savarese
3+
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
This library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library in the LICENSE file; if not, write
16+
to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17+
Boston, MA 02111-1307 USA

0 commit comments

Comments
 (0)