@Override protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception { if (!bAppend) { this.data.setContent(RamFileData.EMPTY); } return new RamFileOutputStream(this); }
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
/** * @param name The name of the file. * @param fs The FileSystem. */ protected RamFileObject(final AbstractFileName name, final RamFileSystem fs) { super(name, fs); this.getAbstractFileSystem().attach(this); }
@Override protected String[] doListChildren() throws Exception { return this.getAbstractFileSystem().listChildren(this.getName()); }
vfs.addProvider("zip", new org.apache.commons.vfs2.provider.zip.ZipFileProvider()); vfs.addProvider("gz", new org.apache.commons.vfs2.provider.gzip.GzipFileProvider()); vfs.addProvider("ram", new org.apache.commons.vfs2.provider.ram.RamFileProvider()); vfs.addProvider("file", new org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider()); vfs.addProvider("jar", new org.apache.commons.vfs2.provider.jar.JarFileProvider());
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
@Override protected void doAttach() throws Exception { this.getAbstractFileSystem().attach(this); }
@Override protected String[] doListChildren() throws Exception { return this.getAbstractFileSystem().listChildren(this.getName()); }
@Override protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception { if (!bAppend) { this.data.setContent(RamFileData.EMPTY); } return new RamFileOutputStream(this); }
vfs.addProvider("zip", new org.apache.commons.vfs2.provider.zip.ZipFileProvider()); vfs.addProvider("gz", new org.apache.commons.vfs2.provider.gzip.GzipFileProvider()); vfs.addProvider("ram", new org.apache.commons.vfs2.provider.ram.RamFileProvider()); vfs.addProvider("file", new org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider()); vfs.addProvider("jar", new org.apache.commons.vfs2.provider.jar.JarFileProvider());
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
/** * @param name The name of the file. * @param fs The FileSystem. */ protected RamFileObject(final AbstractFileName name, final RamFileSystem fs) { super(name, fs); this.getAbstractFileSystem().attach(this); }
@Override protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception { if (!bAppend) { this.data.setContent(RamFileData.EMPTY); } return new RamFileOutputStream(this); }
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
/** * @param name * The name of the file. * @param fs * The FileSystem. */ protected RamFileObject(final AbstractFileName name, final RamFileSystem fs) { super(name, fs); this.getAbstractFileSystem().attach(this); }
@Override protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception { if (!bAppend) { this.data.setContent(RamFileData.EMPTY); } return new RamFileOutputStream(this); }
@Override protected void doAttach() throws Exception { this.getAbstractFileSystem().attach(this); }
/** * @param name The name of the file. * @param fs The FileSystem. */ protected RamFileObject(final AbstractFileName name, final RamFileSystem fs) { super(name, fs); this.getAbstractFileSystem().attach(this); }
@Override protected void doAttach() throws Exception { this.getAbstractFileSystem().attach(this); }
@Override protected void doAttach() throws Exception { this.getAbstractFileSystem().attach(this); }