本文整理了Java中org.glassfish.jersey.internal.util.Base64.decode()
方法的一些代码示例,展示了Base64.decode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.decode()
方法的具体详情如下:
包路径:org.glassfish.jersey.internal.util.Base64
类名称:Base64
方法名:decode
[英]Decodes Base64 data into octects.
[中]将Base64数据解码为八位字节。
代码示例来源:origin: jersey/jersey
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: jersey/jersey
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: org.glassfish.jersey.bundles/jaxrs-ri
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: org.glassfish.jersey.core/jersey-common
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Decodes array of bytes using base64 decoding and returns the result as a string.
*
* @param buffer Array of bytes to be decoded.
* @return Resulting decoded string.
*/
public static String decodeAsString(final byte[] buffer) {
final byte[] result = decode(buffer);
try {
return new String(result, "ASCII");
} catch (final UnsupportedEncodingException ex) {
// should never happen
return new String(result);
}
}
代码示例来源:origin: ff4j/ff4j
byte[] decodedBytes = Base64.decode(auth.replaceFirst("[B|b]asic ", "").getBytes());
String[] lap = new String(decodedBytes).split(":", 2);
if (lap == null || lap.length != 2) {
内容来源于网络,如有侵权,请联系作者删除!