Új hozzászólás Aktív témák

  • n00n

    őstag

    Köszi mindenkinek, valóban az volt a probléma. :C

    Viszont most az elején szépen elindul a másolás, majd a végére belassul. Nem kellene valami buffert üríteni? Vagy valami amitől gyorsabb lenne?

    if (!dest.exists()) {
    atmasoltFajlok++;
    //if file, then copy it
    //Use bytes stream to support all file types
    InputStream in = new FileInputStream(src);
    OutputStream out = new FileOutputStream(dest);
    byte[] bufferPDF = new byte[1024 * 4];
    int length;
    //copy the file content in bytes
    while ((length = in.read(bufferPDF)) > 0) {
    out.write(bufferPDF, 0, length);
    }
    in.close();
    out.close();
    }

    Plusz utána másolok még más fájlokat, azok is sokkal lassabbak lesznek...

Új hozzászólás Aktív témák