[jcifs] File Size limitation

John Kudrle johnk at telestream.net
Fri Aug 16 03:23:35 EST 2002


	Hello,

	We are using jcifs for accessing/reading network files.  It appears
that files which are > 4GB encounter problems.  I took a quick look at the
source and see that the SmbFileInputStream inherits from the
java.io.InputStream.  Do you know if this 4GB limit is a limitation of the
java.io.InputStream?  I hope this is not a "duplicate" question you are
asked alot; I checked your FAQ and did not see any text regarding file size
limitations.

	Below is a quick snippet of the reader code we are using:

	.
	.
	.
			FileOutputStream out = new FileOutputStream (local);
			.
			.
			.
     			jcifs.smb.SmbFile file = new jcifs.smb.SmbFile
(url);
				
			jcifs.smb.SmbFileInputStream in = new
jcifs.smb.SmbFileInputStream (file);
		
			//	transfer file

			byte[] data = new byte[64000];
				
			long total = 0;
					
			int length = in.read (data);

			while (length > 0)
			{
				out.write (data, 0, length);

				total += (long)length;
						
				session.setCurrent (total);
						
				length = in.read (data);
			}

	With files > 4GB; the in.read(data) method never hits the eof
condition.  It will keep reading until the out.write() method generates an
exception due to disk space.

	Thanks for any information/insight you may have,

	John


	John Kudrle
	Telestream, Inc.

	530-470-1317
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list