Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / sdk / java-v2 / src / main / java / org / arvados / client / utils / static / git-favicon.png
diff --git a/src/main/java/org/arvados/client/utils/FileSplit.java b/src/main/java/org/arvados/client/utils/FileSplit.java
deleted file mode 100644 (file)
index e118edc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) The Arvados Authors. All rights reserved.
- *
- * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
- *
- */
-
-package org.arvados.client.utils;
-
-import org.apache.commons.io.FileUtils;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Based on:
- * {@link} https://stackoverflow.com/questions/10864317/how-to-break-a-file-into-pieces-using-java
- */
-public class FileSplit {
-
-    public static List<File> split(File f, File dir, int splitSize) throws IOException {
-        int partCounter = 1;
-
-        long sizeOfFiles = splitSize * FileUtils.ONE_MB;
-        byte[] buffer = new byte[(int) sizeOfFiles];
-
-        List<File> files = new ArrayList<>();
-        String fileName = f.getName();
-
-        try (FileInputStream fis = new FileInputStream(f); BufferedInputStream bis = new BufferedInputStream(fis)) {
-            int bytesAmount = 0;
-            while ((bytesAmount = bis.read(buffer)) > 0) {
-                String filePartName = String.format("%s.%03d", fileName, partCounter++);
-                File newFile = new File(dir, filePartName);
-                try (FileOutputStream out = new FileOutputStream(newFile)) {
-                    out.write(buffer, 0, bytesAmount);
-                }
-                files.add(newFile);
-            }
-        }
-        return files;
-    }
-}
\ No newline at end of file