绍兴公司网站建设,网站建设在淘宝上以后让还让发布吗,th7 wordpress主题,flask做的网站 网址我必须报价#xff0c;1.将帐户保存到二进制(序列化)文件中。2.从二进制(序列化)文件加载(重新创建)帐户。因此#xff0c;首先#xff0c;我正在查找确切的例子#xff0c;而我却迷失了自己#xff0c;在同样的情况下#xff0c;人们提到xml#xff0c;在我的脑海中1.将帐户保存到二进制(序列化)文件中。2.从二进制(序列化)文件加载(重新创建)帐户。因此首先我正在查找确切的例子而我却迷失了自己在同样的情况下人们提到xml在我的脑海中我认为它的意思像01010011000(二进制)而当我查看其他代码时它看起来就像是正常的文本文件保存。他到底是什么意思有人可以举一个例子或者给我一个更好地阐明这一点的网站吗一旦看到了实际需要执行的操作就可以轻松实现它只是对确切保存的内容(数据方面)以及如何保存感到困惑。*如果我可以将某些代码用于此二进制文件则我已经可以选择通过文本文件(.txt)保存。谢谢这是我现在所拥有的我认为它仍然无法正常工作。import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.ObjectInputStream;import java.io.ObjectOutputStream;import java.io.Serializable;import java.util.logging.Level;import java.util.logging.Logger;public class SerializationMain implements Serializable {public static void saveSerialized(Object YourObject, String filePath) throws IOException {ObjectOutputStream outputStream null;try {outputStream new ObjectOutputStream(new FileOutputStream(filePath .dat));outputStream.writeObject(YourObject);} catch (FileNotFoundException ex) {ex.printStackTrace();} catch (IOException ex) {ex.printStackTrace();} finally {try {if (outputStream ! null) {outputStream.flush();outputStream.close();}} catch (IOException ex) {ex.printStackTrace();}}}public static Object loadSerialized(String filePath, Object[][] data1) throws IOException {try {FileInputStream fileIn new FileInputStream(filePath);ObjectInputStream in new ObjectInputStream(fileIn);try {data1 (Object[][]) in.readObject();} catch (ClassNotFoundException ex) {Logger.getLogger(SerializationMain.class.getName()).log(Level.SEVERE, null, ex);}} catch (FileNotFoundException ex) {ex.printStackTrace();} catch (IOException ex) {ex.printStackTrace();}System.out.println(data1.length);return data1;}}