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