MCPcopy Create free account
hub / github.com/apache/nutch / padTail

Method padTail

src/java/org/apache/nutch/util/Bytes.java:1179–1185  ·  view source on GitHub ↗

@param a array @param length new array size @return Value in a plus length appended 0 bytes

(final byte[] a, final int length)

Source from the content-addressed store, hash-verified

1177 * @return Value in <code>a</code> plus <code>length</code> appended 0 bytes
1178 */
1179 public static byte[] padTail(final byte[] a, final int length) {
1180 byte[] padding = new byte[length];
1181 for (int i = 0; i < length; i++) {
1182 padding[i] = 0;
1183 }
1184 return add(a, padding);
1185 }
1186
1187 /**
1188 * Split passed range. Expensive operation relatively. Uses BigInteger math.

Callers 1

iterateOnSplitsMethod · 0.95

Calls 1

addMethod · 0.95

Tested by

no test coverage detected