MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / fromShort

Method fromShort

src/Bytes.java:139–143  ·  view source on GitHub ↗

Creates a new byte array containing a big-endian 2-byte short integer. @param n A short integer. @return A new byte array containing the given value.

(final short n)

Source from the content-addressed store, hash-verified

137 * @return A new byte array containing the given value.
138 */
139 public static byte[] fromShort(final short n) {
140 final byte[] b = new byte[2];
141 setShort(b, n);
142 return b;
143 }
144
145 /**
146 * Reads a big-endian 4-byte integer from the begining of the given array.

Callers 1

setupMultiNSREMethod · 0.95

Calls 1

setShortMethod · 0.95

Tested by 1

setupMultiNSREMethod · 0.76