MCPcopy Create free account
hub / github.com/antlr/codebuff / extract

Method extract

output/java_guava/1.4.16/BaseEncoding.java:195–203  ·  view source on GitHub ↗
(byte[] result, int length)

Source from the content-addressed store, hash-verified

193 // TODO(lowasser): document the extent of leniency, probably after adding ignore(CharMatcher)
194
195 private static byte[] extract(byte[] result, int length) {
196 if (length == result.length) {
197 return result;
198 } else {
199 byte[] trunc = new byte[length];
200 System.arraycopy(result, 0, trunc, 0, length);
201 return trunc;
202 }
203 }
204
205 /**
206 * Determines whether the specified character sequence is a valid encoded string according to this

Callers 1

decodeCheckedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected