小编San*_*ant的帖子

Python 桌面应用程序数据库

Python支持多数据库

但我想要一个桌面应用程序的数据库,它可以包含在 python py2exe 的设置中

当应用程序包被移动时,它的数据库也想移动

例如它可能与文本文件,但我想要一个以表格格式存储数据的数据库。

建议想法,数据库相关性...

python database python-2.7

5
推荐指数
1
解决办法
2993
查看次数

Java将文件编码为Base64字符串以与其他编码字符串匹配

private static String encodeFileToBase64Binary(String fileName)
        throws IOException {

    File file = new File(fileName);
    byte[] bytes = loadFile(file);
    byte[] encoded = Base64.encodeBase64(bytes);
    String encodedString = new String(encoded,StandardCharsets.US_ASCII);

    return encodedString;
}
private static byte[] loadFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);

    long length = file.length();
    if (length > Integer.MAX_VALUE) {
        // File is too large
    }
    byte[] bytes = new byte[(int)length];

    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length
           && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) …
Run Code Online (Sandbox Code Playgroud)

java string base64 encoding utf-8

5
推荐指数
3
解决办法
4万
查看次数

标签 统计

base64 ×1

database ×1

encoding ×1

java ×1

python ×1

python-2.7 ×1

string ×1

utf-8 ×1