<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font size="-1"><font face="Lucida Sans Unicode">Hi Mike et al<br>
<br>
<font size="-1">I believe that the file pointer is being
advanced too far following a read <font size="-1">fully.<br>
<br>
<font size="-1">For e<font size="-1">xample,<br>
<font size="-1"> SmbRandomAccessFile raf = new
SmbRandomAccessFile(</font></font></font></font></font></font></font><font
size="-1"><font face="Lucida Sans Unicode"><font size="-1"><font
size="-1"><font size="-1"><font size="-1"><font size="-1"><font
size="-1"><font face="Lucida Sans Unicode"><font
size="-1"><font size="-1"><font size="-1"><font
size="-1"><font size="-1">new
SmbFile(<a class="moz-txt-link-rfc2396E" href="mailto:smb://username:pwd@server/share/foo/bar/file.dat">"smb://username:pwd@server/share/foo/bar/file.dat"</a>)</font></font></font></font></font></font></font>,
"r");<br>
raf.readFully(new byte[512]);<br>
System.out.println(raf.getFilePointer());<br>
<font size="-1">reads 512 bytes but prints 1024.<font
size="-1"> A subsequent read <font size="-1">takes
place at 1024 instead of 512.<br>
<br>
<font size="-1">It looks like readFully may be
incrementing the file pointer as well as
read(), which is called b<font size="-1">y</font>
readFully, causing a double increment.<br>
<br>
<font size="-1">Best Regards and thanks again
for jcifs.<br>
<font size="-1">Richard<br>
<br>
</font></font></font></font></font></font></font></font></font></font></font></font></font>
</body>
</html>