Examples of TFileInputStream


Examples of de.schlichtherle.truezip.file.TFileInputStream

        createNewFile(patchFile, jarEntry);
    }

    public static void extractFromJar(final File fileNew, final TFile jarEntry) {
        TFileOutputStream outputStream = null;
        TFileInputStream inputStream = null;
        try {
            outputStream = new TFileOutputStream(fileNew);
            inputStream = new TFileInputStream(jarEntry);

            ByteStreams.copy(inputStream, outputStream);
        } catch (Exception ignored) {
        } finally {
            Closeables.closeQuietly(outputStream);
View Full Code Here

Examples of de.schlichtherle.truezip.file.TFileInputStream

    public static TFile jarFile(final File jarFile, final String dirInJar, final String targetFileName) {
        return new TFile(format("{0}/{1}/{2}", jarFile.getAbsolutePath(), dirInJar, targetFileName));
    }

    private static void createNewFile(final TFile patchFilePath, final TFile jar) {
        TFileInputStream inputStream = null;
        TFileOutputStream outputStream = null;
        try {
            inputStream = new TFileInputStream(patchFilePath);
            outputStream = new TFileOutputStream(jar);

            ByteStreams.copy(inputStream, outputStream);
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of de.schlichtherle.truezip.file.TFileInputStream

    protected long calcFileChecksum(final File file) {
        try {
            return ByteStreams.getChecksum(new InputSupplier<TFileInputStream>() {
                @Override
                public TFileInputStream getInput() throws IOException {
                    return new TFileInputStream(file);
                }
            }, new CRC32());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of de.schlichtherle.truezip.file.TFileInputStream

  @Override
  public void importProjects(File file) throws FileNotFoundException, IOException {
    Map<String, Map<String, GenericEntity<Long, ?>>> idsMapping = new HashMap<String, Map<String, GenericEntity<Long, ?>>>();

    Workbook workbook = new HSSFWorkbook(new TFileInputStream(file));
    doImportItem(idsMapping, workbook, Project.class);
    doImportItem(idsMapping, workbook, ProjectVersion.class);
  }
View Full Code Here

Examples of net.java.truevfs.access.TFileInputStream

        if (!file.exists()) {
            log.debug("File does not exist: " + file.toString());
            return null;
        }
        try {
            TFileInputStream inputStream = new TFileInputStream(file);
            image = ImageIO.read(inputStream);
            inputStream.close();
        } catch (Exception e) {
            log.error(e, e);
        }

        return image;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.