本文整理了Java中com.sun.jna.Native.toByteArray()
方法的一些代码示例,展示了Native.toByteArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Native.toByteArray()
方法的具体详情如下:
包路径:com.sun.jna.Native
类名称:Native
方法名:toByteArray
暂无
代码示例来源:origin: net.java.dev.jna/jna
/**
* @param s The string
* @return A NUL-terminated byte buffer equivalent to the given String,
* using the encoding returned by {@link #getDefaultStringEncoding()}.
* @see #toByteArray(String, String)
*/
public static byte[] toByteArray(String s) {
return toByteArray(s, getDefaultStringEncoding());
}
代码示例来源:origin: net.java.dev.jna/jna
/**
* @param s The string. Must not be {@code null}.
* @param encoding The encoding - if {@code null} then the default platform
* encoding is used
* @return A NUL-terminated byte buffer equivalent to the given String,
* using the given encoding.
* @see #getBytes(String, String)
*/
public static byte[] toByteArray(String s, String encoding) {
return Native.toByteArray(s, Native.getCharset(encoding));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
public RASDEVSPECIFICINFO(String s) {
this(Native.toByteArray(s));
}
代码示例来源:origin: net.java.dev.jna/platform
public DATA_BLOB(String s) {
this(Native.toByteArray(s));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
public RASEAPINFO(String s) {
this(Native.toByteArray(s));
}
代码示例来源:origin: net.java.dev.jna/jna-platform
public DATA_BLOB(String s) {
this(Native.toByteArray(s));
}
代码示例来源:origin: de.mkammerer/argon2-jvm
private boolean verifyBytes(String hash, byte[] pwd) {
// encoded needs to be nul terminated for strlen to work
byte[] encoded = Native.toByteArray(hash, ASCII);
int result = callLibraryVerify(encoded, pwd);
return result == Argon2Library.ARGON2_OK;
}
代码示例来源:origin: org.elasticsearch/jna
/**
* @param s The string
* @return A NUL-terminated byte buffer equivalent to the given String,
* using the encoding returned by {@link #getDefaultStringEncoding()}.
* @see #toByteArray(String, String)
*/
public static byte[] toByteArray(String s) {
return toByteArray(s, getDefaultStringEncoding());
}
代码示例来源:origin: phxql/argon2-jvm
private boolean verifyBytes(String hash, byte[] pwd) {
// encoded needs to be nul terminated for strlen to work
byte[] encoded = Native.toByteArray(hash, ASCII);
int result = callLibraryVerify(encoded, pwd);
return result == Argon2Library.ARGON2_OK;
}
代码示例来源:origin: kritzikratzi/edsdk4j
err = CanonUtils.toEdsError( CanonCamera.EDSDK.EdsCreateFileStream( Native.toByteArray( destination.getCanonicalPath() ), EdsFileCreateDisposition.kEdsFileCreateDisposition_CreateAlways.value(), EdsAccess.kEdsAccess_ReadWrite.value(), stream ) );
内容来源于网络,如有侵权,请联系作者删除!