Package org.jnode.fs

Examples of org.jnode.fs.ReadOnlyFileSystemException


        final int off = 0;
        // TODO optimize it also to use ByteBuffer at lower level
        final byte[] src = ByteBufferUtils.toArray(srcBuf);

        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("write in readonly filesystem");
        }

        // synchronize to the inode cache to make sure that the inode does not
        // get
        // flushed between reading it and locking it
View Full Code Here


    public boolean isDirectory() {
        return jarEntry.isDirectory();
    }

    public void setName(String newName) throws IOException {
        throw new ReadOnlyFileSystemException("jar file system is readonly");
    }
View Full Code Here

    public void setName(String newName) throws IOException {
        throw new ReadOnlyFileSystemException("jar file system is readonly");
    }

    public void setLastModified(long lastModified) throws IOException {
        throw new ReadOnlyFileSystemException("jar file system is readonly");
    }
View Full Code Here

    /**
     * @see org.jnode.fs.FSFile#write(long, ByteBuffer)
     */
    public void write(long fileOffset, ByteBuffer src) throws IOException {
        throw new ReadOnlyFileSystemException("Not yet implemented");
    }
View Full Code Here

    /**
     * @see org.jnode.fs.FSDirectory#addFile(java.lang.String)
     */
    public FSEntry addFile(String name) throws IOException {
        throw new ReadOnlyFileSystemException("jar file systems are always readOnly");
    }
View Full Code Here

    /**
     * @see org.jnode.fs.FSDirectory#addDirectory(java.lang.String)
     */
    public FSEntry addDirectory(String name) throws IOException {
        throw new ReadOnlyFileSystemException("jar file systems are always readOnly");
    }
View Full Code Here

    /**
     * @see org.jnode.fs.FSDirectory#remove(java.lang.String)
     */
    public void remove(String name) throws IOException {
        throw new ReadOnlyFileSystemException("jar file systems are always readOnly");
    }
View Full Code Here

     * @throws IOException
     */
    public final synchronized FSEntry addDirectory(String name) throws IOException {
        log.debug("<<< BEGIN addDirectory " + name + " >>>");
        if (!canWrite())
            throw new ReadOnlyFileSystemException("Filesystem or directory is mounted read-only!");

        if (getEntry(name) != null) {
            throw new IOException("File or Directory already exists" + name);
        }
        FSEntry newEntry = createDirectoryEntry(name);
View Full Code Here

     * @return the added file entry
     */
    public final synchronized FSEntry addFile(String name) throws IOException {
        log.debug("<<< BEGIN addFile " + name + " >>>");
        if (!canWrite())
            throw new ReadOnlyFileSystemException("Filesystem or directory is mounted read-only!");

        if (getEntry(name) != null) {
            throw new IOException("File or directory already exists: " + name);
        }
        FSEntry newEntry = createFileEntry(name);
View Full Code Here

    public void flush() throws IOException {
        // TODO -> extended FSEntry maybe have to be flushed
    }

    public FSEntry addDirectory(String name) throws IOException {
        throw new ReadOnlyFileSystemException();
    }
View Full Code Here

TOP

Related Classes of org.jnode.fs.ReadOnlyFileSystemException

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.