Unidata Support wrote:
Im not sure what you are diffing here? The 2 look identical. Is the
above code incorrect?
From: "Stephen P. Cerruti" <s.cerruti@xxxxxxxxxxxx>
Subject: Bug? in ucar.unidata.io.RandomAccessFile NetCDF for Java
I am using ucar.unidata.io.RandomAccessFile in another application to
speed processing of some corrupted tiff files.
I discovered that when writing out large chunks of data when the buffer
was unmodified the file pointer was not in the correct position.
< bufferStart = dataEnd = dataSize = 0;
> bufferStart = dataEnd = dataSize = 0;
> file.seek(filePosition); // JC added Oct 21, 2004
< file.seek(filePosition); // JC added Oct 21, 2004
Also, and I don't know if this was intentional, but ReadUnsignedShort is
not swapping bytes.
< if (bigEndian)
< return (short)((ch1 << 8) + (ch2 << 0));
< return (short)((ch2 << 8) + (ch1 << 0));
> return (ch1 << 8) + (ch2 << 0);
thanks, that was inadvertant; ill add in your fix
Thanks for the class.
youre welcome, thanks for your feedback