src/main/java/com/sauljohnson/checkers/BsdChecksumCalculator.java
private byte[] shortToByteArray(short x) {
        return new byte[] {
                (byte) ((x >> 8) & 0xff),
                (byte) (x & 0xff)
        };
    }
/**
     * Converts a 16-bit integer to a length-2 byte array.
     * @param x the integer to convert
     * @return  a length-2 byte array containing the result
     */
Converts a 16-bit integer to a length-2 byte array.
@param x the integer to convert
@return  a length-2 byte array containing the result
Converts a 16 - bit integer to a length - 2 byte array . @param x the integer to convert @return a length - 2 byte array containing the result
private byte[] shortToByteArray(short x) {
        return new byte[] {
                (byte) ((x >> 8) & 0xff),
                (byte) (x & 0xff)
        };
    }
private byte [ ] shortToByteArray ( short x ) { return new byte [ ] { ( byte ) ( ( x >> 8 ) & 0xff ) , ( byte ) ( x & 0xff ) } ; }
Converts a 16-bit integer to a length-2 byte array.
Converts a 16 - bit integer to a length - 2 byte array .