File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
src/main/java/org/scijava/io/handle Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -136,13 +136,32 @@ default boolean ensureWritable(final long count) throws IOException {
136136 */
137137 void setOrder (ByteOrder order );
138138
139- /** Gets the endianness of the stream. */
139+ /**
140+ * Returns true iff the stream's order is {@link ByteOrder#BIG_ENDIAN}.
141+ *
142+ * @see #getOrder()
143+ */
144+ default boolean isBigEndian () {
145+ return getOrder () == ByteOrder .BIG_ENDIAN ;
146+ }
147+
148+ /**
149+ * Returns true iff the stream's order is {@link ByteOrder#LITTLE_ENDIAN}.
150+ *
151+ * @see #getOrder()
152+ */
140153 default boolean isLittleEndian () {
141154 return getOrder () == ByteOrder .LITTLE_ENDIAN ;
142155 }
143156
144- /** Sets the endianness of the stream. */
145- default void setOrder (final boolean little ) {
157+ /**
158+ * Sets the endianness of the stream.
159+ *
160+ * @param little If true, sets the order to {@link ByteOrder#LITTLE_ENDIAN};
161+ * otherwise, sets the order to {@link ByteOrder#BIG_ENDIAN}.
162+ * @see #setOrder(ByteOrder)
163+ */
164+ default void setLittleEndian (final boolean little ) {
146165 setOrder (little ? ByteOrder .LITTLE_ENDIAN : ByteOrder .BIG_ENDIAN );
147166 }
148167
You can’t perform that action at this time.
0 commit comments