aspose file tools*
The moose likes Java in General and the fly likes readShort vs readUnsignedShort() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "readShort vs readUnsignedShort()" Watch "readShort vs readUnsignedShort()" New topic
Author

readShort vs readUnsignedShort()

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
how is readShort() different from readUnsignedShort() when both of them are meant to read data written using writeShort()?


Help me!Help you!!!
Shivaji Marathe
Ranch Hand

Joined: Jan 11, 2002
Posts: 203
readShort can return both the positive and negative values of short.
Readunsingedshort will only return the positive values or rather the absolute values.
Try writing a small program where you write some positive values and some negative values and then try to use readShort and readUnsignedShort to read the positive and negative values.
See what you get.
HTH
[ February 12, 2002: Message edited by: Shivaji Marathe ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: readShort vs readUnsignedShort()
 
Similar Threads
NX: Confused about data format
I passed, but I suffered the 44/80 locking penalty. Why?
extracting bytes from byte array
NX: n bytes numeric - is it unsigned ?
B&S: Data File Format