我编写了一个程序,将一系列数据保存在一个文件中,然后将其上传到firebase。问题是,当文件上传时,新数据将取代旧数据,旧数据将被删除。我保留先前数据的解决方案是首先创建一个名为"file2.txt“的文件,并将数据保存在其中。它的容量将达到50K,然后这个文件将被上传,然后创建一个名为"file2.txt“的文件,当它的卷达到50k时,它将被上传,并将继续相同的进程。现在我的问题是,我有一个问题,使这个过程,创建文件的顺序,然后上传它们。请用源代码指导我。
String app_name ="app is name :"+applicationLa
在Java web应用程序中,我从各种内存文件(存储为byte[])中创建了一个压缩文件。
以下是关键代码:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(baos);
for (//each member of a collection of objects) {
PDFDocument pdfDocument = //generate PDF for this member of the coll
DirectoryInfo di = Directory.CreateDirectory(precombine); // I am creating a new directory.
BinaryWriter write = new BinaryWriter(File.Open(di.FullName, FileMode.Create)); // I want to open a file in it
write.Write(buffer); // and then I want to write in it.
但是,我得到了一个错误,就是不允许在其中写东西。如何为用户创建一个新目