private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
private InputStream getInputStream(String managedFiles, int openMask) throws IOException { if (useReliableFiles) { int id = getId(managedFiles); if (id == -1) return null; return new ReliableFileInputStream(new File(getBase(), managedFiles), id, openMask); } File lookup = lookup(managedFiles, false); if (lookup == null) return null; return new FileInputStream(lookup); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
/** * Returns a <code>ManagedOutputStream</code> for a managed file. * Closing the ouput stream will update the storage manager with the * new content of the managed file. * * @param managedFile the name of the managed file to write. * @return a managed output stream for the managed file. * @throws IOException if an error occurs opening the managed file. */ public ManagedOutputStream getOutputStream(String managedFile) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(getBase(), managedFile)); return new ManagedOutputStream(out, this, managedFile, null); } File tmpFile = createTempFile(managedFile); return new ManagedOutputStream(new FileOutputStream(tmpFile), this, managedFile, tmpFile); }
cacheStorageManager.lookup(TableReader.NAMESPACES, true); cacheStorageManager.lookup(TableReader.ORPHANS, true); tableFile = File.createTempFile(TableReader.TABLE, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ mainFile = File.createTempFile(TableReader.MAIN, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ extraFile = File.createTempFile(TableReader.EXTRA, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ contributionsFile = File.createTempFile(TableReader.CONTRIBUTIONS, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ contributorsFile = File.createTempFile(TableReader.CONTRIBUTORS, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ namespacesFile = File.createTempFile(TableReader.NAMESPACES, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ orphansFile = File.createTempFile(TableReader.ORPHANS, ".new", cacheStorageManager.getBase()); //$NON-NLS-1$ theTableWriter.setTableFile(tableFile); theTableWriter.setExtraDataFile(extraFile);
add(target, StorageManager.FILETYPE_RELIABLEFILE); update(new String[] {smos.getTarget()}, new String[] {file.getName()}); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); } else { add(smos.getTarget(), StorageManager.FILETYPE_STANDARD);
add(target, StorageManager.FILETYPE_RELIABLEFILE); update(new String[] {smos.getTarget()}, new String[] {file.getName()}); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); } else { add(smos.getTarget(), StorageManager.FILETYPE_STANDARD);
add(target, StorageManager.FILETYPE_RELIABLEFILE); update(new String[] {smos.getTarget()}, new String[] {file.getName()}); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); ReliableFile.fileUpdated(new File(getBase(), smos.getTarget())); } else { add(smos.getTarget(), StorageManager.FILETYPE_STANDARD);