BigEndianWriter

Overview

BigEndianWriter is a class in Aspose.PSD FOSS for Java. Inherits from: AutoCloseable.

Writes big-endian data to a stream.

This class declares 20 methods for BigEndianWriter objects in Java programs. Available methods include: BigEndianWriter, close, getPascalStringStorageLengthAlignedTo4, getPosition, seek, write, writeAllBytes, writeInt, writeLong, writePascalString, writePascalStringAlignedTo2, writePascalStringAlignedTo4, and 5 additional methods. Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package. Properties: position.

Properties

NameTypeAccessDescription
positionlongReadGets the current position within the stream.

Methods

SignatureDescription
BigEndianWriter(stream: OutputStream, leaveOpen: boolean)Initializes a new instance of the BigEndianWriter class.
BigEndianWriter(stream: OutputStream)Initializes a new instance of the BigEndianWriter class that closes the underlying stream on dispose.
getPosition() → longGets the current position within the stream.
seek(offset: long, origin: SeekOrigin)Not implemented in the FOSS edition — throws at runtime. Seeks to a position in the stream.
write(value: byte)Writes a single byte to the stream.
write(buffer: byte[])Writes a byte array to the stream.
write(buffer: byte[], offset: int, count: int)Writes a subarray of bytes to the stream.
writeSByte(value: byte)Writes a signed byte (sbyte) to the stream.
writeShort(value: short)Writes a 16-bit signed integer in big-endian format.
writeUShort(value: int)Writes a 16-bit unsigned integer in big-endian format.
writeInt(value: int)Writes a 32-bit signed integer in big-endian format.
writeUInt(value: long)Writes a 32-bit unsigned integer in big-endian format.
writeLong(value: long)Writes a 64-bit signed integer in big-endian format.
writeULong(value: long)Writes a 64-bit unsigned integer in big-endian format.
writePascalString(value: String)Writes a PSD Pascal string whose length byte and payload are padded to a 4-byte boundary.
writePascalStringAlignedTo2(value: String)Writes a PSD resource Pascal string whose length byte and payload are padded to a 2-byte boundary.
writePascalStringAlignedTo4(value: String)Writes a PSD layer Pascal string whose length byte and payload are padded to a 4-byte boundary.
getPascalStringStorageLengthAlignedTo4(value: String) → intReturns the stored byte count for a PSD Pascal string aligned to a 4-byte boundary.
writeAllBytes(data: byte[])Writes all bytes from the specified array to the stream.
close()Releases the stream resources.

See Also