jcifs-0.5.1 from tgz
authorFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 13:57:02 +0000 (15:57 +0200)
committerFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 13:57:02 +0000 (15:57 +0200)
commit0c4a74deb8d9f329557b1ce5c220fa3916318dad
treef1eba189abf0a60bf908ffb10c8c9bbadae30341
jcifs-0.5.1 from tgz

Mon Aug 27 00:29:02 EDT 2001

jcifs-0.5.1

Chris did some great testing at the CIFS Conference Interoperability
Lab and found three minor bugs. They are described in detail here:

http://lists.samba.org/pipermail/jcifs/2001-August/001428.html

These packages will now work with Java 1.1 as well as Java 2.

Sun Jul 29 04:01:18 EDT 2001

jcifs-0.5

This is the final release of the 0.5 series. It is the most stable and
complete product the jCIFS team has to offer. There are no known bugs. A bug
in the renameTo operation (would not always return false when it should have)
has been fixed, API documentation improvements have been made, and a
entry to the FAQ has been added.

Fri Jul 13 18:54:37 EDT 2001

jcifs-0.5b2

Thanks to Rob for realizing that attempting to read the same file from
different processes/threads yielded an "The file is being used by another
process" exception. We had the share flags and access masks wrong. A
Log.CRITICAL_EXCEPTIONS mask has been added for logging messages to the
console. If:

    Log.setMask( Log.CRITICAL_EXCEPTIONS );

is set, the "Access denied", "Bad password", and "The device is not
ready" sorts of exceptions will NOT be printed. The default is still
Log.EXCEPTIONS which encompasses both Log.CRITICAL_EXCEPTIONS and regular
Log.EXCEPTIONS so existing code will not be affected.

Thu Jun 28 21:04:15 EDT 2001

jcifs-0.5b

This is the beta release of jcifs-0.5. The 0.5 series has already been
through a stable release and there are no know bugs so we are confident
that it will perform well. New features since jcifs-0.4 include:

o SmbFile.list() Bug Fix - The jcifs-0.4 package had a serious bug that
  caused a TRANS2_FIND_FIRST2/NEXT2 endless loop. It has been properly
  fixed. This should be the first *complete* stable release.
o Share, Server, and Workroup Enumeration - jCIFS can now list the shares
  on a server, servers of a workgroup, and workgroups on a network.
o CallNamedPipe, TransactNamedPipe, and CreateFile Named Pipe API (Paul)
o Complete SMB Filesharing URL Scheme IETF Draft Support - The smb://
  URL scheme has been fully implemented. (Chris)
o Transactions and RAP API
o Transactions - Full multi-part Transaction requests(used by Transact
  Named Pipes)
o Daylight Savings Bug Fix - jCIFS was not properly correcting for
  daylight savings. (Urban)
o Full SmbComNTCreateAndX Support - We now look just like NT 4 instead
  of Winblows 95 :~)
o Unicode Alignment Bug Fix - Unicode alignment was generally not
  correct and caused many problems in early 0.5dev releases.
o SmbFile Method Behaviors - Fixed canRead() and re-thought and soul
  searched over the meaning of each of these methods and their behavior
  in the smb://, smb://name, and Named Pipe contexts. These methods
  should start to get pretty stable at this point.
o Clean, No Wait Exiting - Examples and other programs would wait 15
  seconds before exiting. This has been fixed by making the Transport
  thread setDaemon( true ). Same for the NameServiceClient Thread.
o Full Tuneable Batching
o NetBIOS Scope Fix
o New getServer, getShare, isWorkgroup Methods
o SmbShell and SmbCrawler Utilities

Thanks deserved for this release to Chris, Steve, Paul, The DJ, Urban,
James, Thierry, savaJe Technologies, and Josef.

FILES:

   jcifs-0.5b.tgz      jar and javadoc only for UNIX
   jcifs-0.5b.zip      jar and javadoc only for WINDOWS
   jcifs-0.5b.jar      jar file only

NOTE: The source code is included in the above packages. If
you would like to actually build jCIFS the ANT jar files are packaged
separately:

   ant.tgz             ant jar files
   ant.zip             ditto

Just unpack one of the above in the jcifs_0.5b directory, set JAVA_HOME in
build.{sh,bat} to bootstrap Ant, and run $ ./build.sh smb or > build smb.

IMPORTANT:

The jcifs.netbios.ns.nameserver has been changed to jcifs.netbios.wins
and the jcifs.util.Config class should now be referenced as
jcifs.Config. Programs written for jcifs-0.4 will not run without making
these two changes at least.

The jCIFS project uses the 'Ant' build tool available here:

    http://jakarta.apache.org/ant/

If you have *any* trouble please let us know on the mailing list by
sending mail to jcifs@samba.org or to myself at mballen@erols.com.

Enjoy,
Michael B. Allen <mballen@erols.com>

--8<--

                               JCIFS
           Common Internet File System Client in 100% Java
                      http://jcifs.samba.org

This is the JCIFS SMB client library written in Java. In short it
will enable Java applications to remotely access shared directories
on SMB file servers(i.e. a Microsoft Windows "share"). It is a fairly
religious implementation of the CIFS specification supporting Unicode,
batching, multiplexing, encrypted authentication, transactions, named
pipes, share/server/workgroup enumeration, and more. It is licensed
under LGPL which means commercial organizations can legitimately use it
with their propertietary code(you just can't modify the library itself
without reciprocation).

REQUIREMENTS:

Java 1.1 or above - http://java.sun.com/products/

INSTALLATION

Just add the jar file to you classpath as you would with any other
jar. More specifically:

UNIX:

1) Go to http://jcifs.samba.org and download jcifs-0.5b.tgz
2) Put it someplace reasonable and extract it with:

  $ gunzip jcifs-0.5b.tgz
  $ tar -xvf jcifs-0.5b.tar

3) Add the jar to your classpath. There are two ways to do this. One is to
explicitly set it on the command line when you run your application like:

  $ java -cp path/to/jcifs-0.4b.jar MyApplication

or perhaps export it in your .profile/.bash_profile like:

  CLASSPATH=$CLASSPATH:/home/miallen/path/to/jcifs-0.5b.jar
  export CLASSPATH

WINDOWS:

1) Go to http://jcifs.samba.org and download jcifs-0.5b.zip
2) Extract it with winzip and put the files someplace reasonable.
3) Add the jar to your classpath. There are two ways to do this. One is to
explicitly set it on the command line when you run your application like:

  C:\jcifs> java -cp jcifs-0.4b.jar MyApplication

The other way is to alter your system environment but I'm not confident
I can tell you accurately how to do that.

It is also common that the CLASSPATH be specified in a shell script or
batch file. See build.{sh,bat} as a hint.

RUNNING JCIFS:

In general the public API is extremely simple. The jcifs.smb.SmbFile,
jcifs.smb.SmbFileInputStream, and jcifs.smb.SmbFileOutputStream
classes are analogous to the java.io.File, java.io.FileInputStream,
and java.io.FileOutputStream classes so if you know how to use those it
should be quite obvious how to use JCIFS provided you set any necessary
properties(such as wins) and understand the smb:// URL syntax.

Here's an example to retrieve a file:

  import jcifs.smb.*;

  jcifs.Config.setProperty( "wins", "192.168.1.230" );
  SmbFileInputStream in = new SmbFileInputStream(
       "smb://username:password@host/c/My Documents/report.txt" );
  byte[] b = new byte[65535];
  int n;
  while(( n = in.read( b )) > 0 ) {
      System.out.write( b, 0, n );
  }

You can also write, rename, list contents of a directory, enumerate
shares, communicate with Win32 Named Pipe Servers, ...etc.

The protocol handler for java.net.URL is also in place which means you
retrieve files using the URL class as you would with other protocols. For
example:

  Class.forName( "jcifs.Config" ); //ensure protocol handler is loaded
  URL url = new URL( "smb://user:pass@host/share/dir/file.txt" );
  InputStream in = url.openStream();

This will also work with whatever else uses the URL class internally. For
example if you use RMI you can serve class files from an SMB share and
use the codebase property:

  -Djava.rmi.server.codebase=smb://mymachine/c/download/myapp.jar

To execute the Put example you might do:

$ java -cp examples:jcifs-0.4b.jar Put smb://usr:pass@host/share/file.zip
582K transfered

API documentation is included.

WHAT IS SMB AND CIFS?

Server Message Block (SMB) is an application layer networking protocol
for file and print sharing. It is the de-facto networking protocol for
Microsoft Windows platforms. The Common Internet File System (CIFS)
is the more generic name for all that encompasses the protocol and its
many layers. Collectively this is the networking protocol used when you
"Map Network Drive...", issue "net use * \\server\share" commands, use
smbclient on UNIX, smbfs on Linux, Sharity, OS2, server vendors such as
Network Appliance, EMC, and others.

WHY DO YOU NEED JCIFS?

This client is 100% Java and will work the same in a variety of
environments from Palm Pilots and applets to any UNIX that supports
Java. Naturally you can choose to run your applications on a platform
that supports mapping or mounting remote volumes into the local
filesystem but this assumes you know what shares you are accessing in
advance and what platform your application is running on(do you use
/mnt/pnt or H:\dir). Such an approach is not portable, unstable due to
unnecessary dependencies, and can be difficult to manage. JCIFS offers
Java applications that require access to SMB file services portability
and therefore the added stability that the UNIX environment can
provide. The JCIFS infrastructure is also highly extensible. If there
is a demand it will include a great deal of additional functionality
not available through a filesystem API such as printing, RPC, NT file
change notification, etc.

ACKNOWLEDGEMENTS

Special thanks to the Samba organization and Christopher R. Hertel for
starting the JCIFS project.
134 files changed:
README.txt [new file with mode: 0644]
build.bat [new file with mode: 0644]
build.sh [new file with mode: 0644]
build.xml [new file with mode: 0644]
examples/Append.java [new file with mode: 0644]
examples/CallNamedPipe.java [new file with mode: 0644]
examples/CifsTime.java [new file with mode: 0644]
examples/CreateFile.java [new file with mode: 0644]
examples/Delete.java [new file with mode: 0644]
examples/Exists.java [new file with mode: 0644]
examples/FileOps.java [new file with mode: 0644]
examples/Get.java [new file with mode: 0644]
examples/GetDate.java [new file with mode: 0644]
examples/GetURL.java [new file with mode: 0644]
examples/Interleave.java [new file with mode: 0644]
examples/List.java [new file with mode: 0644]
examples/LogTest.java [new file with mode: 0644]
examples/Mkdir.java [new file with mode: 0644]
examples/PipeTalk.java [new file with mode: 0644]
examples/Put.java [new file with mode: 0644]
examples/Query.java [new file with mode: 0644]
examples/RenameTo.java [new file with mode: 0644]
examples/SlowRead.java [new file with mode: 0644]
examples/SlowWrite.java [new file with mode: 0644]
examples/SmbCrawler.java [new file with mode: 0644]
examples/SmbShell.java [new file with mode: 0644]
examples/TestFile.java [new file with mode: 0644]
examples/TestSmbFile.java [new file with mode: 0644]
examples/ThreadedSmbCrawler.java [new file with mode: 0644]
examples/TortureTest3.java [new file with mode: 0644]
examples/TortureTest4.java [new file with mode: 0644]
examples/TortureTest5.java [new file with mode: 0644]
examples/TransactNamedPipe.java [new file with mode: 0644]
examples/jcifs.prp [new file with mode: 0644]
examples/pipes/callnp.c [new file with mode: 0644]
examples/pipes/callnp.exe [new file with mode: 0644]
examples/pipes/createf.c [new file with mode: 0644]
examples/pipes/createf.exe [new file with mode: 0644]
examples/pipes/createnp.c [new file with mode: 0644]
examples/pipes/createnp.exe [new file with mode: 0644]
examples/tt4.prp [new file with mode: 0644]
examples/zzz.java [new file with mode: 0644]
src/jcifs/Config.java [new file with mode: 0644]
src/jcifs/netbios/Lmhosts.java [new file with mode: 0644]
src/jcifs/netbios/Log.java [new file with mode: 0644]
src/jcifs/netbios/Name.java [new file with mode: 0644]
src/jcifs/netbios/NameQueryRequest.java [new file with mode: 0644]
src/jcifs/netbios/NameQueryResponse.java [new file with mode: 0644]
src/jcifs/netbios/NameServiceClient.java [new file with mode: 0644]
src/jcifs/netbios/NameServicePacket.java [new file with mode: 0644]
src/jcifs/netbios/NbtAddress.java [new file with mode: 0644]
src/jcifs/netbios/NbtException.java [new file with mode: 0644]
src/jcifs/netbios/NbtSocket.java [new file with mode: 0644]
src/jcifs/netbios/NodeStatusRequest.java [new file with mode: 0644]
src/jcifs/netbios/NodeStatusResponse.java [new file with mode: 0644]
src/jcifs/netbios/SessionRequestPacket.java [new file with mode: 0644]
src/jcifs/netbios/SessionRetargetResponsePacket.java [new file with mode: 0644]
src/jcifs/netbios/SessionServicePacket.java [new file with mode: 0644]
src/jcifs/netbios/SocketInputStream.java [new file with mode: 0644]
src/jcifs/netbios/SocketOutputStream.java [new file with mode: 0644]
src/jcifs/smb/AndXServerMessageBlock.java [new file with mode: 0644]
src/jcifs/smb/Handler.java [new file with mode: 0644]
src/jcifs/smb/Info.java [new file with mode: 0644]
src/jcifs/smb/Log.java [new file with mode: 0644]
src/jcifs/smb/NetServerEnum2.java [new file with mode: 0644]
src/jcifs/smb/NetServerEnum2Response.java [new file with mode: 0644]
src/jcifs/smb/NetShareEnum.java [new file with mode: 0644]
src/jcifs/smb/NetShareEnumResponse.java [new file with mode: 0644]
src/jcifs/smb/ServerMessageBlock.java [new file with mode: 0644]
src/jcifs/smb/SmbComBlankResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComCheckDirectory.jav [new file with mode: 0644]
src/jcifs/smb/SmbComClose.java [new file with mode: 0644]
src/jcifs/smb/SmbComCopy.jav [new file with mode: 0644]
src/jcifs/smb/SmbComCopyResponse.jav [new file with mode: 0644]
src/jcifs/smb/SmbComCreateDirectory.java [new file with mode: 0644]
src/jcifs/smb/SmbComDelete.java [new file with mode: 0644]
src/jcifs/smb/SmbComDeleteDirectory.java [new file with mode: 0644]
src/jcifs/smb/SmbComEcho.jav [new file with mode: 0644]
src/jcifs/smb/SmbComEchoResponse.jav [new file with mode: 0644]
src/jcifs/smb/SmbComFindClose2.java [new file with mode: 0644]
src/jcifs/smb/SmbComLogoffAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComMove.jav [new file with mode: 0644]
src/jcifs/smb/SmbComMoveResponse.jav [new file with mode: 0644]
src/jcifs/smb/SmbComNTCreateAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComNTCreateAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComNegotiate.java [new file with mode: 0644]
src/jcifs/smb/SmbComNegotiateResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComOpenAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComOpenAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComQueryInformation.java [new file with mode: 0644]
src/jcifs/smb/SmbComQueryInformationResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComReadAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComReadAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComRename.java [new file with mode: 0644]
src/jcifs/smb/SmbComSessionSetupAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComSessionSetupAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComTransaction.java [new file with mode: 0644]
src/jcifs/smb/SmbComTransactionResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComTreeConnectAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComTreeConnectAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbComTreeDisconnect.java [new file with mode: 0644]
src/jcifs/smb/SmbComWriteAndX.java [new file with mode: 0644]
src/jcifs/smb/SmbComWriteAndXResponse.java [new file with mode: 0644]
src/jcifs/smb/SmbException.java [new file with mode: 0644]
src/jcifs/smb/SmbFile.java [new file with mode: 0644]
src/jcifs/smb/SmbFileInputStream.java [new file with mode: 0644]
src/jcifs/smb/SmbFileOutputStream.java [new file with mode: 0644]
src/jcifs/smb/SmbNamedPipe.java [new file with mode: 0644]
src/jcifs/smb/SmbSession.java [new file with mode: 0644]
src/jcifs/smb/SmbTransport.java [new file with mode: 0644]
src/jcifs/smb/SmbTree.java [new file with mode: 0644]
src/jcifs/smb/SmbURL.java [new file with mode: 0644]
src/jcifs/smb/SmbURLConnection.java [new file with mode: 0644]
src/jcifs/smb/Trans2FindFirst2.java [new file with mode: 0644]
src/jcifs/smb/Trans2FindFirst2Response.java [new file with mode: 0644]
src/jcifs/smb/Trans2FindNext2.java [new file with mode: 0644]
src/jcifs/smb/Trans2QueryFSInformation.jav [new file with mode: 0644]
src/jcifs/smb/Trans2QueryFSInformationResponse.jav [new file with mode: 0644]
src/jcifs/smb/Trans2QueryPathInformation.java [new file with mode: 0644]
src/jcifs/smb/Trans2QueryPathInformationResponse.java [new file with mode: 0644]
src/jcifs/smb/TransCallNamedPipe.java [new file with mode: 0644]
src/jcifs/smb/TransCallNamedPipeResponse.java [new file with mode: 0644]
src/jcifs/smb/TransTransactNamedPipe.java [new file with mode: 0644]
src/jcifs/smb/TransTransactNamedPipeResponse.java [new file with mode: 0644]
src/jcifs/smb/TransWaitNamedPipe.java [new file with mode: 0644]
src/jcifs/smb/TransWaitNamedPipeResponse.java [new file with mode: 0644]
src/jcifs/smb/TransactNamedPipeInputStream.java [new file with mode: 0644]
src/jcifs/smb/TransactNamedPipeOutputStream.java [new file with mode: 0644]
src/jcifs/util/Config.java [new file with mode: 0644]
src/jcifs/util/DES.java [new file with mode: 0644]
src/jcifs/util/Log.java [new file with mode: 0644]
src/jcifs/util/LogWriter.java [new file with mode: 0644]
src/jcifs/util/MD4.java [new file with mode: 0644]
src/jcifs/util/PropertiesTree.java [new file with mode: 0644]