mirror of https://github.com/apache/poi.git
reuse code from LittleEndian class
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1187550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
caeb586e1d
commit
24b3701fb6
|
@ -624,6 +624,23 @@ public class LittleEndian implements LittleEndianConsts
|
|||
data[i++] = (byte) ( ( value >>> 8 ) & 0xFF );
|
||||
}
|
||||
|
||||
/**
|
||||
* Put unsigned short into output stream
|
||||
*
|
||||
* @param value
|
||||
* the unsigned short (16-bit) value
|
||||
* @param outputStream
|
||||
* output stream
|
||||
* @throws IOException
|
||||
* if an I/O error occurs
|
||||
*/
|
||||
public static void putUShort( int value, OutputStream outputStream )
|
||||
throws IOException
|
||||
{
|
||||
outputStream.write( (byte) ( ( value >>> 0 ) & 0xFF ) );
|
||||
outputStream.write( (byte) ( ( value >>> 8 ) & 0xFF ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* get an int value from an InputStream
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue