MCPcopy Create free account
hub / github.com/apache/pig / encodeBytes

Method encodeBytes

src/org/apache/pig/impl/util/ObjectSerializer.java:68–70  ·  view source on GitHub ↗
(byte[] bytes)

Source from the content-addressed store, hash-verified

66 }
67
68 public static String encodeBytes(byte[] bytes) throws UnsupportedEncodingException {
69 return bytes == null ? null : new String(Base64.encodeBase64(bytes), Charset.forName("UTF-8"));
70 }
71
72 public static byte[] decodeBytes(String str) throws UnsupportedEncodingException {
73 return Base64.decodeBase64(str.getBytes(Charset.forName("UTF-8")));

Callers 1

serializeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected