[jcifs] SmbRandomAccessFile.write(byte[] b, int off, int len)

Caldarale, Charles R Chuck.Caldarale at unisys.com
Wed Sep 27 22:37:32 GMT 2006


> From: jjrobert at lexmark.com
> Subject: [jcifs] SmbRandomAccessFile.write(byte[] b, int off, int len)
> 
> Writes len bytes from the specified byte array starting at 
> offset off to this file
> 
> But by trial and error, the jCIFS API appears to apply the 
> offset to the ARRAY, not the file.

You've misinterpreted the JRE doc - the java.io.RandomAccessFile also
applies the offset to the array, not the file.  (The doc is admittedly
somewhat ambiguous.)  Use the seek() method to set the file position at
which to read or write.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


More information about the jcifs mailing list