Package de.schlichtherle.truezip.file

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


    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

    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

  @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

TOP

Related Classes of de.schlichtherle.truezip.file.TFileInputStream

Copyright © 2018 www.massapicom. 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.