本文整理了Java中org.apache.commons.net.util.Base64.encodeBase64StringUnChunked()
方法的一些代码示例,展示了Base64.encodeBase64StringUnChunked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encodeBase64StringUnChunked()
方法的具体详情如下:
包路径:org.apache.commons.net.util.Base64
类名称:Base64
方法名:encodeBase64StringUnChunked
[英]Encodes binary data using the base64 algorithm, without using chunking.
For a chunking version, see #encodeBase64String(byte[]).
[中]使用base64算法编码二进制数据,而不使用分块。
有关分块版本,请参见#encodeBase64String(字节[])。
代码示例来源:origin: commons-net/commons-net
/**
* Send the MIC command with the specified data.
* @param data The data to send with the command.
* @return server reply.
* @throws IOException If an I/O error occurs while sending
* the command.
* @since 3.0
*/
public int execMIC(byte[] data) throws IOException
{
if (data != null)
{
return sendCommand(CMD_MIC, Base64.encodeBase64StringUnChunked(data));
}
else
{
return sendCommand(CMD_MIC, ""); // perhaps "=" or just sendCommand(String)?
}
}
代码示例来源:origin: commons-net/commons-net
/**
* Send the ADAT command with the specified authentication data.
* @param data The data to send with the command.
* @return server reply.
* @throws IOException If an I/O error occurs while sending
* the command.
* @since 3.0
*/
public int execADAT(byte[] data) throws IOException
{
if (data != null)
{
return sendCommand(CMD_ADAT, Base64.encodeBase64StringUnChunked(data));
}
else
{
return sendCommand(CMD_ADAT);
}
}
代码示例来源:origin: commons-net/commons-net
/**
* Send the CONF command with the specified data.
* @param data The data to send with the command.
* @return server reply.
* @throws IOException If an I/O error occurs while sending
* the command.
* @since 3.0
*/
public int execCONF(byte[] data) throws IOException
{
if (data != null)
{
return sendCommand(CMD_CONF, Base64.encodeBase64StringUnChunked(data));
}
else
{
return sendCommand(CMD_CONF, ""); // perhaps "=" or just sendCommand(String)?
}
}
代码示例来源:origin: commons-net/commons-net
/**
* Send the ENC command with the specified data.
* @param data The data to send with the command.
* @return server reply.
* @throws IOException If an I/O error occurs while sending
* the command.
* @since 3.0
*/
public int execENC(byte[] data) throws IOException
{
if (data != null)
{
return sendCommand(CMD_ENC, Base64.encodeBase64StringUnChunked(data));
}
else
{
return sendCommand(CMD_ENC, ""); // perhaps "=" or just sendCommand(String)?
}
}
代码示例来源:origin: commons-net/commons-net
System.arraycopy(hmacResult, 0, toEncode, usernameBytes.length + 1, hmacResult.length);
return sendCommand(Base64.encodeBase64StringUnChunked(toEncode)) == POP3Reply.OK;
default:
return false;
代码示例来源:origin: commons-net/commons-net
Base64.encodeBase64StringUnChunked(("\000" + username + "\000" + password)
.getBytes(getCharset())));
if (result == IMAPReply.OK)
System.arraycopy(hmacResult, 0, toEncode, usernameBytes.length + 1, hmacResult.length);
int result = sendData(Base64.encodeBase64StringUnChunked(toEncode));
if (result == IMAPReply.OK)
if (sendData(Base64.encodeBase64StringUnChunked(username.getBytes(getCharset()))) != IMAPReply.CONT)
int result = sendData(Base64.encodeBase64StringUnChunked(password.getBytes(getCharset())));
if (result == IMAPReply.OK)
代码示例来源:origin: commons-net/commons-net
Base64.encodeBase64StringUnChunked(("\000" + username + "\000" + password).getBytes(getCharset()))
));
Base64.encodeBase64StringUnChunked(toEncode)));
Base64.encodeBase64StringUnChunked(username.getBytes(getCharset()))))) {
return false;
Base64.encodeBase64StringUnChunked(password.getBytes(getCharset()))));
Base64.encodeBase64StringUnChunked(username.getBytes(getCharset()))
));
} else {
代码示例来源:origin: vmware/admiral
private static void handleCertForHttpsThroughHttpProxyWithAuth(URL url, Proxy proxy,
String proxyUsername, String proxyPassword, long timeout,
SSLSocketFactory socketFactory) throws IOException {
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(proxy);
connection.setSSLSocketFactory(socketFactory);
connection.setConnectTimeout((int) (timeout < 0 ? 0 : timeout));
if (proxyUsername != null && proxyPassword != null) {
byte[] token = (proxyUsername + ":" + proxyPassword)
.getBytes(StandardCharsets.UTF_8);
connection.setRequestProperty(REQUEST_HEADER_PROXY_AUTHORIZATION,
"Basic " + Base64.encodeBase64StringUnChunked(token));
}
connection.connect();
connection.disconnect();
}
内容来源于网络,如有侵权,请联系作者删除!