Package org.jnode.fs

Examples of org.jnode.fs.ReadOnlyFileSystemException


    }

    @Override
    public void flush() throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException();
        }
        boolean flushEntries = isEntriesLoaded() && entries.isDirty();
        if (entry.isDirty() || flushEntries) {
            writeEntries(entries);
            // entries.resetDirty();
View Full Code Here


    }

    @Override
    public void remove(String name) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException();
        }
        if (entries.remove(name) >= 0) {
            entry.setDirty();
            flush();
        } else {
View Full Code Here

     * @return Return the newly created entry.
     * @throws IOException if problem occurs during catalog node creation or if system is read-only.
     */
    private FSEntry createDirectoryEntry(final String name) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException();
        }
        Catalog catalog = ((HfsPlusFileSystem) getFileSystem()).getCatalog();
        SuperBlock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader();
        CatalogLeafNode node =
            catalog.createNode(name, this.folder.getFolderId(),
View Full Code Here

     * @throws IOException
     */
    public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException {
        if (isClosed()) throw new IOException("FS closed");

        if (isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!");

        Block block;

        Integer key = Integer.valueOf((int) nr);
        int blockSize = superblock.getBlockSize();
View Full Code Here

     * This method allways throws an Exception, since the JarFileSystem is not writable.
     *
     * @see org.jnode.driver.block.FileDevice#write(long, java.nio.ByteBuffer)
     */
    public void write(long devOffset, ByteBuffer srcBuf) throws IOException {
        throw new ReadOnlyFileSystemException("jar file systems are not writeable");
    }
View Full Code Here

     * This method allways throws an Exception, since the JarFileSystem is not writable.
     *
     * @see org.jnode.driver.block.FileDevice#setLength(long)
     */
    public void setLength(long length) throws IOException {
        throw new ReadOnlyFileSystemException("jar file systems are not writeable");
    }
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.