diff --git a/src/java/org/apache/poi/util/LittleEndian.java b/src/java/org/apache/poi/util/LittleEndian.java index 5b238b004..fa67dfdda 100644 --- a/src/java/org/apache/poi/util/LittleEndian.java +++ b/src/java/org/apache/poi/util/LittleEndian.java @@ -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 *