/** * @see FileSystem#getOutputStream */ public OutputStream getOutputStream() throws FileSystemException { return fs.getOutputStream(path); }
/** * @see FileSystem#getOutputStream */ public OutputStream getOutputStream() throws FileSystemException { return fs.getOutputStream(path); }
/** * @see FileSystem#getOutputStream */ public OutputStream getOutputStream() throws FileSystemException { return fs.getOutputStream(path); }
/** * {@inheritDoc} */ public OutputStream getOutputStream(String filePath) throws FileSystemException { return fsBase.getOutputStream(buildBasePath(filePath)); }
/** * {@inheritDoc} */ public OutputStream getOutputStream(String filePath) throws FileSystemException { return fsBase.getOutputStream(buildBasePath(filePath)); }
/** * {@inheritDoc} */ public OutputStream getOutputStream(String filePath) throws FileSystemException { return fsBase.getOutputStream(buildBasePath(filePath)); }
private void createFile(String fileName, byte[] bytes) throws IOException, FileSystemException { OutputStream outputStream = fs.getOutputStream(fileName); outputStream.write(bytes); outputStream.close(); }
/** * {@inheritDoc} */ public synchronized void store(NodeReferences refs) throws ItemStateException { if (!initialized) { throw new IllegalStateException("not initialized"); } try { StringBuffer buf = buildNodeFolderPath(null, refs.getTargetId()); buf.append('.'); buf.append(NODEREFSFILENAME); String fileName = buf.toString(); String dir = fileName.substring(0, fileName.lastIndexOf(FileSystem.SEPARATOR_CHAR)); if (!itemFs.exists(dir)) { itemFs.createFolder(dir); } OutputStream out = itemFs.getOutputStream(fileName); Serializer.serialize(refs, out); out.close(); } catch (Exception e) { String msg = "failed to write " + refs; BundleFsPersistenceManager.log.error(msg, e); throw new ItemStateException(msg, e); } }
/** * {@inheritDoc} */ public synchronized void store(NodeReferences refs) throws ItemStateException { if (!initialized) { throw new IllegalStateException("not initialized"); } try { StringBuffer buf = buildNodeFolderPath(null, refs.getTargetId()); buf.append('.'); buf.append(NODEREFSFILENAME); String fileName = buf.toString(); String dir = fileName.substring(0, fileName.lastIndexOf(FileSystem.SEPARATOR_CHAR)); if (!itemFs.exists(dir)) { itemFs.createFolder(dir); } OutputStream out = itemFs.getOutputStream(fileName); Serializer.serialize(refs, out); out.close(); } catch (Exception e) { String msg = "failed to write " + refs; BundleFsPersistenceManager.log.error(msg, e); throw new ItemStateException(msg, e); } }
/** * {@inheritDoc} */ protected synchronized void storeBundle(NodePropBundle bundle) throws ItemStateException { try { StringBuffer buf = buildNodeFolderPath(null, bundle.getId()); buf.append('.'); buf.append(NODEFILENAME); String fileName = buf.toString(); String dir = fileName.substring(0, fileName.lastIndexOf(FileSystem.SEPARATOR_CHAR)); if (!itemFs.exists(dir)) { itemFs.createFolder(dir); } OutputStream out = itemFs.getOutputStream(fileName); try { binding.writeBundle(out, bundle); } finally { out.close(); } } catch (Exception e) { String msg = "failed to write bundle: " + bundle.getId(); BundleFsPersistenceManager.log.error(msg, e); throw new ItemStateException(msg, e); } }
/** * {@inheritDoc} */ protected synchronized void storeBundle(NodePropBundle bundle) throws ItemStateException { try { StringBuffer buf = buildNodeFolderPath(null, bundle.getId()); buf.append('.'); buf.append(NODEFILENAME); String fileName = buf.toString(); String dir = fileName.substring(0, fileName.lastIndexOf(FileSystem.SEPARATOR_CHAR)); if (!itemFs.exists(dir)) { itemFs.createFolder(dir); } OutputStream out = itemFs.getOutputStream(fileName); try { binding.writeBundle(out, bundle); } finally { out.close(); } } catch (Exception e) { String msg = "failed to write bundle: " + bundle.getId(); BundleFsPersistenceManager.log.error(msg, e); throw new ItemStateException(msg, e); } }
virtualFS.getOutputStream(configFile)); } catch (FileSystemException e) { throw new ConfigurationException(
virtualFS.getOutputStream(configFile)); } catch (FileSystemException e) { throw new ConfigurationException(