From: Felix Schumacher Date: Wed, 6 Aug 2008 14:29:22 +0000 (+0200) Subject: jcifs-1.1.9 from tgz X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d3c381515ed0dddf68a00fdcf9b6c113daf99e6a;p=jcifs_without_docs.git jcifs-1.1.9 from tgz --- diff --git a/build.xml b/build.xml index b46def1..e86087c 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/examples/AllocInfo.class b/examples/AllocInfo.class new file mode 100644 index 0000000..d052675 Binary files /dev/null and b/examples/AllocInfo.class differ diff --git a/examples/Append.class b/examples/Append.class new file mode 100644 index 0000000..d21f774 Binary files /dev/null and b/examples/Append.class differ diff --git a/examples/AuthListFiles.class b/examples/AuthListFiles.class new file mode 100644 index 0000000..851ae58 Binary files /dev/null and b/examples/AuthListFiles.class differ diff --git a/examples/CallNamedPipe.class b/examples/CallNamedPipe.class new file mode 100644 index 0000000..56a01f5 Binary files /dev/null and b/examples/CallNamedPipe.class differ diff --git a/examples/CopyTo.class b/examples/CopyTo.class new file mode 100644 index 0000000..1eec536 Binary files /dev/null and b/examples/CopyTo.class differ diff --git a/examples/CreateFile.class b/examples/CreateFile.class new file mode 100644 index 0000000..9ae7ab1 Binary files /dev/null and b/examples/CreateFile.class differ diff --git a/examples/Delete.class b/examples/Delete.class new file mode 100644 index 0000000..b52be49 Binary files /dev/null and b/examples/Delete.class differ diff --git a/examples/Equals.class b/examples/Equals.class new file mode 100644 index 0000000..c80c85f Binary files /dev/null and b/examples/Equals.class differ diff --git a/examples/Exists.class b/examples/Exists.class new file mode 100644 index 0000000..9f03ca4 Binary files /dev/null and b/examples/Exists.class differ diff --git a/examples/FileInfo.class b/examples/FileInfo.class new file mode 100644 index 0000000..d877f51 Binary files /dev/null and b/examples/FileInfo.class differ diff --git a/examples/FileOps.class b/examples/FileOps.class new file mode 100644 index 0000000..9a0e176 Binary files /dev/null and b/examples/FileOps.class differ diff --git a/examples/FilterFiles$BigFileFilter.class b/examples/FilterFiles$BigFileFilter.class new file mode 100644 index 0000000..1cd1710 Binary files /dev/null and b/examples/FilterFiles$BigFileFilter.class differ diff --git a/examples/FilterFiles$ShortFilenameFilter.class b/examples/FilterFiles$ShortFilenameFilter.class new file mode 100644 index 0000000..9260f70 Binary files /dev/null and b/examples/FilterFiles$ShortFilenameFilter.class differ diff --git a/examples/FilterFiles.class b/examples/FilterFiles.class new file mode 100644 index 0000000..12a853d Binary files /dev/null and b/examples/FilterFiles.class differ diff --git a/examples/Format.class b/examples/Format.class new file mode 100644 index 0000000..998801f Binary files /dev/null and b/examples/Format.class differ diff --git a/examples/Get.class b/examples/Get.class new file mode 100644 index 0000000..8192c4a Binary files /dev/null and b/examples/Get.class differ diff --git a/examples/GetDate.class b/examples/GetDate.class new file mode 100644 index 0000000..8a82eaa Binary files /dev/null and b/examples/GetDate.class differ diff --git a/examples/GetDfsPath.class b/examples/GetDfsPath.class new file mode 100644 index 0000000..751b59a Binary files /dev/null and b/examples/GetDfsPath.class differ diff --git a/examples/GetType.class b/examples/GetType.class new file mode 100644 index 0000000..1028177 Binary files /dev/null and b/examples/GetType.class differ diff --git a/examples/GetURL.class b/examples/GetURL.class new file mode 100644 index 0000000..e473c42 Binary files /dev/null and b/examples/GetURL.class differ diff --git a/examples/GrowWrite.class b/examples/GrowWrite.class new file mode 100644 index 0000000..bb1d8f6 Binary files /dev/null and b/examples/GrowWrite.class differ diff --git a/examples/HttpURL.class b/examples/HttpURL.class new file mode 100644 index 0000000..55faf3c Binary files /dev/null and b/examples/HttpURL.class differ diff --git a/examples/Interleave$IThread.class b/examples/Interleave$IThread.class new file mode 100644 index 0000000..12d7d51 Binary files /dev/null and b/examples/Interleave$IThread.class differ diff --git a/examples/Interleave.class b/examples/Interleave.class new file mode 100644 index 0000000..4ea28d5 Binary files /dev/null and b/examples/Interleave.class differ diff --git a/examples/IsDir.class b/examples/IsDir.class new file mode 100644 index 0000000..712a60e Binary files /dev/null and b/examples/IsDir.class differ diff --git a/examples/Length.class b/examples/Length.class new file mode 100644 index 0000000..b096ceb Binary files /dev/null and b/examples/Length.class differ diff --git a/examples/List.class b/examples/List.class new file mode 100644 index 0000000..2d2e7b0 Binary files /dev/null and b/examples/List.class differ diff --git a/examples/ListFiles.class b/examples/ListFiles.class new file mode 100644 index 0000000..190cd04 Binary files /dev/null and b/examples/ListFiles.class differ diff --git a/examples/ListTypes.class b/examples/ListTypes.class new file mode 100644 index 0000000..6da499c Binary files /dev/null and b/examples/ListTypes.class differ diff --git a/examples/Mkdir.class b/examples/Mkdir.class new file mode 100644 index 0000000..4c96536 Binary files /dev/null and b/examples/Mkdir.class differ diff --git a/examples/NodeStatus.class b/examples/NodeStatus.class new file mode 100644 index 0000000..12e8052 Binary files /dev/null and b/examples/NodeStatus.class differ diff --git a/examples/OpenExclusive.class b/examples/OpenExclusive.class new file mode 100644 index 0000000..1802220 Binary files /dev/null and b/examples/OpenExclusive.class differ diff --git a/examples/PeekNamedPipe$ReceiverThread.class b/examples/PeekNamedPipe$ReceiverThread.class new file mode 100644 index 0000000..642652c Binary files /dev/null and b/examples/PeekNamedPipe$ReceiverThread.class differ diff --git a/examples/PeekNamedPipe.class b/examples/PeekNamedPipe.class new file mode 100644 index 0000000..3cebbd0 Binary files /dev/null and b/examples/PeekNamedPipe.class differ diff --git a/examples/PipeTalk$ReceiverThread.class b/examples/PipeTalk$ReceiverThread.class new file mode 100644 index 0000000..d05ca7a Binary files /dev/null and b/examples/PipeTalk$ReceiverThread.class differ diff --git a/examples/PipeTalk.class b/examples/PipeTalk.class new file mode 100644 index 0000000..ccad890 Binary files /dev/null and b/examples/PipeTalk.class differ diff --git a/examples/Put.class b/examples/Put.class new file mode 100644 index 0000000..43b1e70 Binary files /dev/null and b/examples/Put.class differ diff --git a/examples/Query.class b/examples/Query.class new file mode 100644 index 0000000..0112790 Binary files /dev/null and b/examples/Query.class differ diff --git a/examples/RenameTo.class b/examples/RenameTo.class new file mode 100644 index 0000000..c169e35 Binary files /dev/null and b/examples/RenameTo.class differ diff --git a/examples/SetAttrs.class b/examples/SetAttrs.class new file mode 100644 index 0000000..d36bada Binary files /dev/null and b/examples/SetAttrs.class differ diff --git a/examples/SetTime.class b/examples/SetTime.class new file mode 100644 index 0000000..79b5e36 Binary files /dev/null and b/examples/SetTime.class differ diff --git a/examples/SlowRead.class b/examples/SlowRead.class new file mode 100644 index 0000000..de72174 Binary files /dev/null and b/examples/SlowRead.class differ diff --git a/examples/SlowWrite.class b/examples/SlowWrite.class new file mode 100644 index 0000000..84a1cff Binary files /dev/null and b/examples/SlowWrite.class differ diff --git a/examples/SmbCrawler.class b/examples/SmbCrawler.class new file mode 100644 index 0000000..7b303b6 Binary files /dev/null and b/examples/SmbCrawler.class differ diff --git a/examples/SmbShell.class b/examples/SmbShell.class new file mode 100644 index 0000000..b9096fa Binary files /dev/null and b/examples/SmbShell.class differ diff --git a/examples/SmbTableFile.class b/examples/SmbTableFile.class new file mode 100644 index 0000000..c1bfe46 Binary files /dev/null and b/examples/SmbTableFile.class differ diff --git a/examples/SmbTableFileRecord.class b/examples/SmbTableFileRecord.class new file mode 100644 index 0000000..b5d68ff Binary files /dev/null and b/examples/SmbTableFileRecord.class differ diff --git a/examples/T2Crawler$CrawlerThread.class b/examples/T2Crawler$CrawlerThread.class new file mode 100644 index 0000000..0b40e5c Binary files /dev/null and b/examples/T2Crawler$CrawlerThread.class differ diff --git a/examples/T2Crawler$Semaphore.class b/examples/T2Crawler$Semaphore.class new file mode 100644 index 0000000..af3b771 Binary files /dev/null and b/examples/T2Crawler$Semaphore.class differ diff --git a/examples/T2Crawler.class b/examples/T2Crawler.class new file mode 100644 index 0000000..ffb3192 Binary files /dev/null and b/examples/T2Crawler.class differ diff --git a/examples/TestRandomAccess$TestRecord.class b/examples/TestRandomAccess$TestRecord.class new file mode 100644 index 0000000..872eb31 Binary files /dev/null and b/examples/TestRandomAccess$TestRecord.class differ diff --git a/examples/TestRandomAccess.class b/examples/TestRandomAccess.class new file mode 100644 index 0000000..5fdf0df Binary files /dev/null and b/examples/TestRandomAccess.class differ diff --git a/examples/TestSmbURL.class b/examples/TestSmbURL.class new file mode 100644 index 0000000..d73dd32 Binary files /dev/null and b/examples/TestSmbURL.class differ diff --git a/examples/TestUnicode.class b/examples/TestUnicode.class new file mode 100644 index 0000000..92304e8 Binary files /dev/null and b/examples/TestUnicode.class differ diff --git a/examples/ThreadedNbtQuery$QThread.class b/examples/ThreadedNbtQuery$QThread.class new file mode 100644 index 0000000..1259b6d Binary files /dev/null and b/examples/ThreadedNbtQuery$QThread.class differ diff --git a/examples/ThreadedNbtQuery.class b/examples/ThreadedNbtQuery.class new file mode 100644 index 0000000..0d21e06 Binary files /dev/null and b/examples/ThreadedNbtQuery.class differ diff --git a/examples/ThreadedSmbCrawler$DirEntry.class b/examples/ThreadedSmbCrawler$DirEntry.class new file mode 100644 index 0000000..f849d93 Binary files /dev/null and b/examples/ThreadedSmbCrawler$DirEntry.class differ diff --git a/examples/ThreadedSmbCrawler$SmbCrawlerThread.class b/examples/ThreadedSmbCrawler$SmbCrawlerThread.class new file mode 100644 index 0000000..a95e988 Binary files /dev/null and b/examples/ThreadedSmbCrawler$SmbCrawlerThread.class differ diff --git a/examples/ThreadedSmbCrawler.class b/examples/ThreadedSmbCrawler.class new file mode 100644 index 0000000..e0747bf Binary files /dev/null and b/examples/ThreadedSmbCrawler.class differ diff --git a/examples/ThreadedUniQuery$QThread.class b/examples/ThreadedUniQuery$QThread.class new file mode 100644 index 0000000..02d02e0 Binary files /dev/null and b/examples/ThreadedUniQuery$QThread.class differ diff --git a/examples/ThreadedUniQuery.class b/examples/ThreadedUniQuery.class new file mode 100644 index 0000000..08632f7 Binary files /dev/null and b/examples/ThreadedUniQuery.class differ diff --git a/examples/Torture1.class b/examples/Torture1.class new file mode 100644 index 0000000..72d5f77 Binary files /dev/null and b/examples/Torture1.class differ diff --git a/examples/Torture2.class b/examples/Torture2.class new file mode 100644 index 0000000..e688b4f Binary files /dev/null and b/examples/Torture2.class differ diff --git a/examples/TortureTest5.class b/examples/TortureTest5.class new file mode 100644 index 0000000..cadf7c2 Binary files /dev/null and b/examples/TortureTest5.class differ diff --git a/examples/TransactNamedPipe.class b/examples/TransactNamedPipe.class new file mode 100644 index 0000000..76f861c Binary files /dev/null and b/examples/TransactNamedPipe.class differ diff --git a/examples/URLTest.class b/examples/URLTest.class new file mode 100644 index 0000000..5263435 Binary files /dev/null and b/examples/URLTest.class differ diff --git a/examples/VerifyGuest.class b/examples/VerifyGuest.class new file mode 100644 index 0000000..6a8ce08 Binary files /dev/null and b/examples/VerifyGuest.class differ diff --git a/examples/VerifyIO.class b/examples/VerifyIO.class new file mode 100644 index 0000000..1168477 Binary files /dev/null and b/examples/VerifyIO.class differ diff --git a/examples/VerifyReads.class b/examples/VerifyReads.class new file mode 100644 index 0000000..ff0d0a1 Binary files /dev/null and b/examples/VerifyReads.class differ diff --git a/examples/Worker.class b/examples/Worker.class new file mode 100644 index 0000000..25fa3b2 Binary files /dev/null and b/examples/Worker.class differ diff --git a/examples/m31_gendler_big.jpg b/examples/m31_gendler_big.jpg new file mode 100644 index 0000000..bcbb749 Binary files /dev/null and b/examples/m31_gendler_big.jpg differ diff --git a/src/jcifs/UniAddress.java b/src/jcifs/UniAddress.java index 504334b..458488f 100644 --- a/src/jcifs/UniAddress.java +++ b/src/jcifs/UniAddress.java @@ -192,7 +192,7 @@ public class UniAddress { * Determines the address of a host given it's host name. The name can be a * machine name like "jcifs.samba.org", or an IP address like "192.168.1.15". * - * @param host NetBIOS or DNS hostname to resolve + * @param hostname NetBIOS or DNS hostname to resolve * @throws java.net.UnknownHostException if there is an error resolving the name */ diff --git a/src/jcifs/netbios/.SessionServicePacket.java.swp b/src/jcifs/netbios/.SessionServicePacket.java.swp new file mode 100644 index 0000000..12f4162 Binary files /dev/null and b/src/jcifs/netbios/.SessionServicePacket.java.swp differ diff --git a/src/jcifs/netbios/SessionServicePacket.java b/src/jcifs/netbios/SessionServicePacket.java index 8d7fb43..a1a8d6c 100644 --- a/src/jcifs/netbios/SessionServicePacket.java +++ b/src/jcifs/netbios/SessionServicePacket.java @@ -60,12 +60,28 @@ abstract class SessionServicePacket { (( src[srcIndex++] & 0xFF ) << 8 ) + ( src[srcIndex++] & 0xFF ); } + static int readn( InputStream in, + byte[] b, + int off, + int len ) throws IOException { + int i = 0, n; + + while (i < len) { + n = in.read( b, off + i, len - i ); + if (n <= 0) { + break; + } + i += n; + } + + return i; + } static int readPacketType( InputStream in, byte[] buffer, int bufferIndex ) throws IOException { int n; - if(( n = in.read( buffer, bufferIndex, HEADER_LENGTH )) != HEADER_LENGTH ) { + if(( n = readn( in, buffer, bufferIndex, HEADER_LENGTH )) != HEADER_LENGTH ) { if( n == -1 ) { return -1; } diff --git a/src/jcifs/ntlmssp/Type3Message.java b/src/jcifs/ntlmssp/Type3Message.java index 3523728..90e1416 100644 --- a/src/jcifs/ntlmssp/Type3Message.java +++ b/src/jcifs/ntlmssp/Type3Message.java @@ -182,7 +182,7 @@ public class Type3Message extends NtlmMessage { * * @param flags The flags to apply to this message. * @param lmResponse The LanManager/LMv2 response. - * @param domain The NT/NTLMv2 response. + * @param ntResponse The NT/NTLMv2 response. * @param domain The domain in which the user has an account. * @param user The username for the authenticating user. * @param workstation The workstation from which authentication is @@ -238,7 +238,7 @@ public class Type3Message extends NtlmMessage { /** * Sets the NT/NTLMv2 response for this message. * - * @param lmResponse The NT/NTLMv2 response. + * @param ntResponse The NT/NTLMv2 response. */ public void setNTResponse(byte[] ntResponse) { this.ntResponse = ntResponse; diff --git a/src/jcifs/smb/SmbFile.java b/src/jcifs/smb/SmbFile.java index 4330e50..9675d0f 100644 --- a/src/jcifs/smb/SmbFile.java +++ b/src/jcifs/smb/SmbFile.java @@ -2001,7 +2001,7 @@ try { * servers. * * @param dest the destination file or directory - * @throw SmbException + * @throws SmbException */ public void copyTo( SmbFile dest ) throws SmbException { SmbComReadAndX req; @@ -2145,7 +2145,7 @@ try { * * @return The length of the file in bytes or 0 if this * SmbFile is not a file. - * @throw SmbException + * @throws SmbException */ public long length() throws SmbException { @@ -2320,7 +2320,7 @@ try { * the setAttributes() method. * * @return the ATTR_* attributes associated with this file - * @throw SmbException + * @throws SmbException */ public int getAttributes() throws SmbException { if( getUncPath0().length() == 1 ) { @@ -2335,7 +2335,7 @@ try { * bitset by bitwise ORing the ATTR_* constants. Setting the * value returned by getAttributes will result in both files * having the same attributes. - * @throw SmbException + * @throws SmbException */ public void setAttributes( int attrs ) throws SmbException { if( getUncPath0().length() == 1 ) { @@ -2349,7 +2349,7 @@ try { * Make this file read-only. This is shorthand for setAttributes( * getAttributes() | ATTR_READ_ONLY ). * - * @throw SmbException + * @throws SmbException */ public void setReadOnly() throws SmbException { setAttributes( getAttributes() | ATTR_READONLY ); @@ -2359,7 +2359,7 @@ try { * Turn off the read-only attribute of this file. This is shorthand for * setAttributes( getAttributes() & ~ATTR_READONLY ). * - * @throw SmbException + * @throws SmbException */ public void setReadWrite() throws SmbException { setAttributes( getAttributes() & ~ATTR_READONLY ); @@ -2371,9 +2371,9 @@ try { * access an SMB resource. Currently only retrieving data and information * is supported (i.e. no doOutput). * - * @depricated Use getURL() instead + * @deprecated Use getURL() instead * @return A new {@link java.net.URL} for this SmbFile - * @throw MalformedURLException + * @throws MalformedURLException */ public URL toURL() throws MalformedURLException { return url; @@ -2389,7 +2389,7 @@ try { * to make such a determination. * * @return A hashcode for this abstract file - * @throw SmbException + * @throws SmbException */ public int hashCode() { @@ -2423,7 +2423,7 @@ try { * @param obj Another SmbFile object to compare for equality * @return true if the two objects refer to the same SMB resource * and false otherwise - * @throw SmbException + * @throws SmbException */ public boolean equals( Object obj ) { @@ -2437,7 +2437,7 @@ try { * as getPath. * * @return The original URL representation of this SMB resource - * @throw SmbException + * @throws SmbException */ public String toString() { @@ -2488,7 +2488,7 @@ try { /** * This URLConnection method just returns a new SmbFileInputStream created with this file. * - * @throw IOException thrown by SmbFileInputStream constructor + * @throws IOException thrown by SmbFileInputStream constructor */ public InputStream getInputStream() throws IOException { return new SmbFileInputStream( this ); @@ -2497,7 +2497,7 @@ try { /** * This URLConnection method just returns a new SmbFileOutputStream created with this file. * - * @throw IOException thrown by SmbFileOutputStream constructor + * @throws IOException thrown by SmbFileOutputStream constructor */ public OutputStream getOutputStream() throws IOException { return new SmbFileOutputStream( this ); diff --git a/src/jcifs/smb/SmbFileInputStream.java b/src/jcifs/smb/SmbFileInputStream.java index 626812a..2acaf49 100644 --- a/src/jcifs/smb/SmbFileInputStream.java +++ b/src/jcifs/smb/SmbFileInputStream.java @@ -43,7 +43,6 @@ public class SmbFileInputStream extends InputStream { * URL syntax. * * @param url An smb URL string representing the file to read from - * @return A new InputStream for the specified SmbFile */ public SmbFileInputStream( String url ) throws SmbException, MalformedURLException, UnknownHostException { @@ -56,8 +55,7 @@ public class SmbFileInputStream extends InputStream { * {@link jcifs.smb.SmbFile} for a detailed description and examples of * the smb URL syntax. * - * @param url An smb URL string representing the file to write to - * @return A new InputStream for the specified SmbFile + * @param file An SmbFile specifying the file to read from */ public SmbFileInputStream( SmbFile file ) throws SmbException, MalformedURLException, UnknownHostException { diff --git a/src/jcifs/smb/SmbFileOutputStream.java b/src/jcifs/smb/SmbFileOutputStream.java index d1893f6..15b5d90 100644 --- a/src/jcifs/smb/SmbFileOutputStream.java +++ b/src/jcifs/smb/SmbFileOutputStream.java @@ -48,7 +48,6 @@ public class SmbFileOutputStream extends OutputStream { * the smb URL syntax. * * @param url An smb URL string representing the file to write to - * @return A new OutputStream for the specified file */ public SmbFileOutputStream( String url ) throws SmbException, MalformedURLException, UnknownHostException { @@ -61,8 +60,7 @@ public class SmbFileOutputStream extends OutputStream { * {@link jcifs.smb.SmbFile} for a detailed description and examples of * the smb URL syntax. * - * @param url An SmbFile specifying the file to write to - * @return A new OutputStream for the specified SmbFile + * @param file An SmbFile specifying the file to write to */ public SmbFileOutputStream( SmbFile file ) throws SmbException, MalformedURLException, UnknownHostException { @@ -77,7 +75,7 @@ public class SmbFileOutputStream extends OutputStream { * end of the file rather than the beginning. * * @param url An smb URL string representing the file to write to - * @return A new OutputStream for the specified url + * @param append Append to the end of file */ public SmbFileOutputStream( String url, boolean append ) throws SmbException, MalformedURLException, UnknownHostException { @@ -91,8 +89,8 @@ public class SmbFileOutputStream extends OutputStream { * the smb URL syntax. If the second argument is true, then * bytes will be written to the end of the file rather than the beginning. * - * @param url An SmbFile representing the file to write to - * @return A new OutputStream for the specified SmbFile + * @param file An SmbFile representing the file to write to + * @param append Append to the end of file */ public SmbFileOutputStream( SmbFile file, boolean append ) throws SmbException, MalformedURLException, UnknownHostException { @@ -114,8 +112,8 @@ accessed by another process" error. The FILE_SHARE_READ, combined with the bitwise OR '|' to specify that other peocesses may read, write, and/or delete the file while the jCIFS user has the file open. * - * @param url An SmbFile representing the file to write to - * @return A new OutputStream for the specified SmbFile + * @param url An smb URL representing the file to write to + * @param shareAccess File sharing flag: SmbFile.FILE_NOSHARE or any combination of SmbFile.FILE_READ, SmbFile.FILE_WRITE, and SmbFile.FILE_DELETE */ public SmbFileOutputStream( String url, int shareAccess ) throws SmbException, MalformedURLException, UnknownHostException { diff --git a/src/jcifs/util/Hexdump.java b/src/jcifs/util/Hexdump.java index c76ef28..efd40bd 100644 --- a/src/jcifs/util/Hexdump.java +++ b/src/jcifs/util/Hexdump.java @@ -131,11 +131,10 @@ public class Hexdump { } /** - * This is the same as {@link jcifs.util.Log#toHexString(int val, int + * This is the same as {@link jcifs.util.Hexdump#toHexString(int val, int * size)} but provides a more practical form when trying to avoid {@link * java.lang.String} concatenation and {@link java.lang.StringBuffer}. */ - public static void toHexChars( int val, char dst[], int dstIndex, int size ) { while( size > 0 ) { int i = dstIndex + size - 1;