/** * Returns the <code>ByteOrder corresponding to the specified orderByte. </code> * * @param orderByte (0 or 1) * @return corresponding <code>ByteOrder</code>, resp. <code>XDR</code> or <code>NDR</code>. */ public static ByteOrder valueOf(byte orderByte) { for (ByteOrder wbo : values()) { if (orderByte == wbo.byteValue()) return wbo; } throw new IllegalArgumentException("Order byte must be 0 or 1"); }
protected void writeByteOrder(ByteBuffer output) { output.put(output.getByteOrder().byteValue()); }