From: <ls...@us...> - 2008-08-26 18:28:44
|
Revision: 4512 http://jnode.svn.sourceforge.net/jnode/?rev=4512&view=rev Author: lsantha Date: 2008-08-26 18:28:40 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Throwing ReadOnlyFileSystemExcpetion in directory modification operations on read-only file systems. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java trunk/fs/src/fs/org/jnode/fs/jifs/JIFileSystem.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java Modified: trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -29,7 +29,10 @@ * New exception allowing to handle cases where a FileSystem is mounted readOnly */ public class ReadOnlyFileSystemException extends IOException { - + + public ReadOnlyFileSystemException() { + super("read-only file system"); + } /** * @param message * @param cause Modified: trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -22,6 +22,7 @@ package org.jnode.fs.ftpfs; import org.jnode.fs.FSDirectory; +import org.jnode.fs.ReadOnlyFileSystemException; import java.io.IOException; import java.util.HashMap; @@ -100,8 +101,7 @@ * @throws java.io.IOException */ public FTPFSEntry addDirectory(String name) throws IOException { - // TODO implement this - return null; + throw new ReadOnlyFileSystemException(); } /** @@ -111,8 +111,7 @@ * @throws java.io.IOException */ public FTPFSEntry addFile(String name) throws IOException { - // TODO implement this - return null; + throw new ReadOnlyFileSystemException(); } /** @@ -121,7 +120,7 @@ * @throws java.io.IOException */ public void flush() throws IOException { - // TODO implement me + //nothing to do } /** @@ -131,6 +130,6 @@ * @throws java.io.IOException */ public void remove(String name) throws IOException { - // TODO implement this + throw new ReadOnlyFileSystemException(); } } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -6,6 +6,7 @@ import org.apache.log4j.Logger; import org.jnode.fs.FSEntry; +import org.jnode.fs.ReadOnlyFileSystemException; import org.jnode.fs.hfsplus.catalog.CatalogFolder; import org.jnode.fs.hfsplus.catalog.CatalogKey; import org.jnode.fs.hfsplus.tree.LeafRecord; @@ -31,16 +32,18 @@ @Override protected final FSEntry createDirectoryEntry(final String name) throws IOException { - // TODO Auto-generated method stub - return null; + throw new ReadOnlyFileSystemException(); } @Override protected final FSEntry createFileEntry(final String name) throws IOException { - // TODO Auto-generated method stub - return null; + throw new ReadOnlyFileSystemException(); } + public synchronized void remove(String name) throws IOException { + throw new ReadOnlyFileSystemException(); + } + @Override protected final FSEntryTable readEntries() throws IOException { List<FSEntry> pathList = new LinkedList<FSEntry>(); Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -27,6 +27,7 @@ import org.jnode.fs.FSDirectory; import org.jnode.fs.FSEntry; import org.jnode.fs.FileSystem; +import org.jnode.fs.ReadOnlyFileSystemException; import org.jnode.util.LittleEndian; /** @@ -93,21 +94,21 @@ * @see org.jnode.fs.FSDirectory#addFile(java.lang.String) */ public FSEntry addFile(String name) throws IOException { - throw new UnsupportedOperationException("Not yet implemented"); + throw new ReadOnlyFileSystemException(); } /** * @see org.jnode.fs.FSDirectory#addDirectory(java.lang.String) */ public FSEntry addDirectory(String name) throws IOException { - throw new UnsupportedOperationException("Not yet implemented"); + throw new ReadOnlyFileSystemException(); } /** * @see org.jnode.fs.FSDirectory#remove(java.lang.String) */ public void remove(String name) throws IOException { - throw new UnsupportedOperationException("Not yet implemented"); + throw new ReadOnlyFileSystemException(); } /** Modified: trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -77,12 +77,12 @@ // TODO -> extended FSEntry maybe have to be flushed } - public FSEntry addDirectory(String name) { - return null; + public FSEntry addDirectory(String name) throws IOException { + throw new ReadOnlyFileSystemException(); } - public FSEntry addFile(String name) { - return null; + public FSEntry addFile(String name) throws IOException { + throw new ReadOnlyFileSystemException(); } public Iterator<FSEntry> iterator() { @@ -90,7 +90,7 @@ } public void remove(String name) throws IOException { - throw new ReadOnlyFileSystemException("you can not remove from JNIFS.."); + throw new ReadOnlyFileSystemException(); } public boolean isValid() { Modified: trunk/fs/src/fs/org/jnode/fs/jifs/JIFileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/JIFileSystem.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/jifs/JIFileSystem.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -21,12 +21,7 @@ package org.jnode.fs.jifs; -import java.io.IOException; - import org.jnode.driver.Device; -import org.jnode.fs.FSDirectory; -import org.jnode.fs.FSEntry; -import org.jnode.fs.FSFile; import org.jnode.fs.FileSystem; import org.jnode.fs.FileSystemException; import org.jnode.fs.jifs.directories.JIFSDrootDir; @@ -61,11 +56,12 @@ * Is the filesystem mounted in readonly mode ? */ public boolean isReadOnly() { - return true; // always readOnly + // always readOnly + return true; } public void close() { - return; + //nothing to do } public boolean isClosed() { @@ -77,16 +73,6 @@ } /** - * Flush all changed structures to the device. Since JIFS is readonly, this - * method does nothing. - * - * @throws IOException - */ - public void flush() throws IOException { - return; - } - - /** * Gets the root entry of this filesystem. This is usually a director, but * this is not required. * @@ -96,41 +82,15 @@ return rootDir; } - /** - * Gets the file for the given entry. - * - * @return null - * @param entry - */ - public synchronized JIFSFile getFile(FSEntry entry) { - return null; - } - - protected FSFile createFile(FSEntry entry) throws IOException { - return null; - } - - protected FSDirectory createDirectory(FSEntry entry) throws IOException { - return null; - } - - protected FSEntry createRootEntry() throws IOException { - return null; - } - public long getFreeSpace() { - // TODO implement me return -1; } public long getTotalSpace() { - // TODO implement me return -1; } public long getUsableSpace() { - // TODO implement me return -1; } - } Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -28,6 +28,7 @@ import org.jnode.fs.FSDirectory; import org.jnode.fs.FSEntry; import org.jnode.fs.FileSystem; +import org.jnode.fs.ReadOnlyFileSystemException; /** * @author vali @@ -75,25 +76,22 @@ /** * */ - public FSEntry addFile(String name) { - // TODO Auto-generated method stub - return null; + public FSEntry addFile(String name) throws IOException { + throw new ReadOnlyFileSystemException(); } /** * */ - public FSEntry addDirectory(String name) { - // TODO Auto-generated method stub - return null; + public FSEntry addDirectory(String name) throws IOException { + throw new ReadOnlyFileSystemException(); } /** * Remove the entry with the given name from this directory. */ - public void remove(String name) { - // TODO Auto-generated method stub - + public void remove(String name) throws IOException { + throw new ReadOnlyFileSystemException(); } /** Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java 2008-08-26 18:15:18 UTC (rev 4511) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java 2008-08-26 18:28:40 UTC (rev 4512) @@ -143,7 +143,7 @@ * @param name * @throws IOException */ - public final synchronized void remove(String name) throws IOException { + public synchronized void remove(String name) throws IOException { if (!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!"); if (entries.remove(name) >= 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2009-02-27 15:27:10
|
Revision: 5067 http://jnode.svn.sourceforge.net/jnode/?rev=5067&view=rev Author: galatnm Date: 2009-02-27 15:27:07 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Improve javadocs. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/FileSystem.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFileSystem.java Modified: trunk/fs/src/fs/org/jnode/fs/FileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FileSystem.java 2009-02-26 21:53:20 UTC (rev 5066) +++ trunk/fs/src/fs/org/jnode/fs/FileSystem.java 2009-02-27 15:27:07 UTC (rev 5067) @@ -25,6 +25,8 @@ import org.jnode.driver.Device; /** + * The <tt>FileSystem<tt> interface provide methods common to file system implementations. + * * @author epr */ public interface FileSystem<T extends FSEntry> { @@ -33,23 +35,27 @@ /** * Gets the device this FS driver operates on. + * + * @return {@Device} contains this file system. */ public Device getDevice(); /** * Gets the root entry of this filesystem. This is usually a directory, but * this is not required. + * + * @return {@link FSEntry} corresponding to root entry. */ public T getRootEntry() throws IOException; /** - * Is the file system. mounted in read-only mode ? + * Returns <tt>true</tt> if the file system is mounted in read-only mode. */ public boolean isReadOnly(); /** * Close this file system. After a close, all invocations of method of this - * file system. or objects created by this file system. will throw an + * file system or objects created by this file system will throw an * IOException. * * @throws IOException @@ -57,27 +63,33 @@ public void close() throws IOException; /** - * Is this file system. closed. + * Returns <tt>true</tt> if this file system is close. */ public boolean isClosed(); /** - * The total size of this file system. - * @return if -1 this feature is unsupported + * Return The total size in bytes of this file system. + * + * @return total size in bytes or -1 if this feature is unsupported. + * * @throws IOException if an I/O error occurs */ public long getTotalSpace() throws IOException; /** - * The free space of this file system. - * @return if -1 this feature is unsupported + * The total free space in bytes of this file system. + * + * @return total free space in bytes or -1 if this feature is unsupported + * * @throws IOException if an I/O error occurs */ public long getFreeSpace() throws IOException; /** * The usable space of this file system. - * @return if -1 this feature is unsupported + * + * @return usable space in bytes or -1 if this feature is unsupported + * * @throws IOException if an I/O error occurs */ public long getUsableSpace() throws IOException; Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFileSystem.java 2009-02-26 21:53:20 UTC (rev 5066) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFileSystem.java 2009-02-27 15:27:07 UTC (rev 5067) @@ -36,37 +36,42 @@ import org.jnode.fs.FileSystemType; /** - * Abstract class with common things in different FileSystem implementations + * This class provide a basic implementation of {@link FileSystem} interface. * * @author Fabien DUMINY */ public abstract class AbstractFileSystem<T extends FSEntry> implements FileSystem<T> { - + /** */ private static final Logger log = Logger.getLogger(AbstractFileSystem.class); - private boolean readOnly; + /** The device that contains the file system */ private final Device device; + /** API of the block device */ private final BlockDeviceAPI api; + /** Type of the file system */ private final FileSystemType<? extends FileSystem<T>> type; + /** Root enntry of the file system */ + private T rootEntry; + /** The file system is read-only */ + private boolean readOnly; + /** The file system is closed */ private boolean closed; - private T rootEntry; - - // cache of FSFile (key: FSEntry) + /** The cache of files */ private HashMap<FSEntry, FSFile> files = new HashMap<FSEntry, FSFile>(); - - // cache of FSDirectory (key: FSEntry) + /** The cache of directory */ private HashMap<FSEntry, FSDirectory> directories = new HashMap<FSEntry, FSDirectory>(); /** * Construct an AbstractFileSystem in specified readOnly mode * - * @param device - * @param readOnly - * @throws FileSystemException + * @param device device contains file system. This paramter is mandatory. + * @param readOnly file system should be read-only. + * + * @throws FileSystemException device is null or device has no {@link BlockDeviceAPI} defined. */ public AbstractFileSystem(Device device, boolean readOnly, FileSystemType<? extends FileSystem<T>> type) throws FileSystemException { if (device == null) - throw new IllegalArgumentException("null device!"); + throw new FileSystemException("Device cannot be null."); this.device = device; @@ -88,6 +93,9 @@ return device; } + /** + * @see org.jnode.fs.FileSystem#getType() + */ public final FileSystemType<? extends FileSystem<T>> getType() { return type; } @@ -109,20 +117,13 @@ * @see org.jnode.fs.FileSystem#close() */ public void close() throws IOException { - if (!isClosed()) { - // if readOnly, nothing to do - if (!isReadOnly()) { + if (!closed) { + if (!readOnly) { flush(); } - api.flush(); files.clear(); directories.clear(); - - // these fields are final, can't nullify them - // device = null; - // api = null; - rootEntry = null; files = null; directories = null; @@ -131,9 +132,9 @@ } /** - * Save the content that have been altered but not saved in the Device + * Save any cached data (files, directories, ...) to the device. * - * @throws IOException + * @throws IOException if error occurs during write of datas on the device. */ public void flush() throws IOException { flushFiles(); @@ -141,34 +142,47 @@ } /** - * @return Returns the api. + * Returns block device api. + * + * @return {@link BlockDeviceAPI}. */ public final BlockDeviceAPI getApi() { return api; } /** - * @return Returns the FSApi. - * @throws ApiNotFoundException + * Return file system block device api. + * + * @return {@link BlockDeviceAPI} + * + * @throws ApiNotFoundException if no api found for this file system device. */ public final FSBlockDeviceAPI getFSApi() throws ApiNotFoundException { return device.getAPI(FSBlockDeviceAPI.class); } - /** - * @return if filesystem is closed. + /* + * (non-Javadoc) + * @see org.jnode.fs.FileSystem#isClosed() */ public final boolean isClosed() { return closed; } /** - * @return if filesystem is readOnly. + * Returns <tt>true</tt> if file system is read-only. + * + * @return <tt>true</tt> if file system is read-only. */ public final boolean isReadOnly() { return readOnly; } + /** + * Sets file system as a read-only file system. + * + * @param readOnly <tt>true</tt> if file system should be treated as a read-only file system. + */ protected final void setReadOnly(boolean readOnly) { this.readOnly = readOnly; } @@ -177,8 +191,10 @@ * Gets the file for the given entry. * * @param entry - * @return the FSFile object associated with entry - * @throws IOException + * + * @return the {@link FSFile} associated with entry. + * + * @throws IOException if file system is closed. */ public final synchronized FSFile getFile(FSEntry entry) throws IOException { if (isClosed()) @@ -193,18 +209,19 @@ } /** - * Abstract method to create a new FSFile from the entry + * Creates a new file from the entry * * @param entry - * @return a new created FSFile + * @return a new {@link FSFile} + * * @throws IOException */ protected abstract FSFile createFile(FSEntry entry) throws IOException; /** - * Flush all unsaved FSFile in our cache + * Save all unsaved files from entry cache. * - * @throws IOException + * @throws IOException if error occurs during write of datas on the device. */ private final void flushFiles() throws IOException { log.info("flushing files ..."); @@ -212,7 +229,6 @@ if (log.isDebugEnabled()) { log.debug("flush: flushing file " + f); } - f.flush(); } } @@ -221,7 +237,9 @@ * Gets the file for the given entry. * * @param entry - * @return the FSDirectory object associated with this entry + * + * @return the {@link FSDirectory} associated with this entry + * * @throws IOException */ public final synchronized FSDirectory getDirectory(FSEntry entry) throws IOException { @@ -237,18 +255,17 @@ } /** - * Abstract method to create a new directory from the given entry + * Creates a new directory from the entry * * @param entry - * @return the new created FSDirectory + * @return a new {@link FSDirectory} + * * @throws IOException */ protected abstract FSDirectory createDirectory(FSEntry entry) throws IOException; /** - * Flush all unsaved FSDirectory in our cache - * - * @throws IOException + * Save all unsaved files from entry cache. */ private final void flushDirectories() { log.info("flushing directories ..."); @@ -256,16 +273,17 @@ if (log.isDebugEnabled()) { log.debug("flush: flushing directory " + d); } - //TODO: uncomment this line //d.flush(); } } /** - * Abstract method to create a new root entry - * @return the new created root entry - * @throws IOException + * Creates a new root entry + * + * @return {@link FSEntry} representing the new created root entry. + * + * @throws IOException file system doesn't allow to create a new root entry. */ protected abstract T createRootEntry() throws IOException; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2009-02-28 19:22:07
|
Revision: 5074 http://jnode.svn.sourceforge.net/jnode/?rev=5074&view=rev Author: galatnm Date: 2009-02-28 19:22:01 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Correct and improve javadocs. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/FSAccessRights.java trunk/fs/src/fs/org/jnode/fs/FSDirectory.java trunk/fs/src/fs/org/jnode/fs/FSFile.java trunk/fs/src/fs/org/jnode/fs/FileSystemType.java Modified: trunk/fs/src/fs/org/jnode/fs/FSAccessRights.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FSAccessRights.java 2009-02-28 18:59:06 UTC (rev 5073) +++ trunk/fs/src/fs/org/jnode/fs/FSAccessRights.java 2009-02-28 19:22:01 UTC (rev 5074) @@ -24,7 +24,7 @@ import java.security.Principal; /** - * This interface described the accessright for a given FSEntry. + * <tt>FSAccessRights</tt> interface described the access rights for a given {@link FSEntry}. * * @author epr */ @@ -33,19 +33,60 @@ /** * Gets the owner of the entry. * - * @throws IOException + * @return {@link Principal} represent owner of the entry. + * + * @throws IOException if error occurs during retrieve of the owner. */ public Principal getOwner() throws IOException; + /** + * Returns <tt>true</tt> if read is allow for the related entry. + * + * @return <tt>true</tt> if read is allow for the related entry. + */ public boolean canRead(); + /** + * Returns <tt>true</tt> if write is allow for the related entry. + * + * @return <tt>true</tt> if write is allow for the related entry. + */ public boolean canWrite(); + /** + * Returns <tt>true</tt> if execution is allow for the related entry. + * + * @return <tt>true</tt> if execution is allow for the related entry. + */ public boolean canExecute(); + /** + * Set related entry as readable. This right can be limited to the owner. + * + * @param enable <tt>true</tt> to allow right to read the related entry. + * @param owneronly <tt>true</tt> to limit the read to the owner. + * + * @return <tt>true</tt> if read is allowed. + */ public boolean setReadable(boolean enable, boolean owneronly); + /** + * Set related entry as writable. This right can be limited to the owner. + * + * @param enable <tt>true</tt> to allow right to write the related entry. + * @param owneronly <tt>true</tt> to limit the write to the owner. + * + * @return <tt>true</tt> if write is allowed. + */ public boolean setWritable(boolean enable, boolean owneronly); + /** + * Set related entry as executable. This right can be limited to the owner. + * + * @param enable <tt>true</tt> to allow right to execute the related entry. + * @param owneronly <tt>true</tt> to limit the read to the owner. + * + * @return <tt>true</tt> if execution is allowed. + */ public boolean setExecutable(boolean enable, boolean owneronly); } Modified: trunk/fs/src/fs/org/jnode/fs/FSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FSDirectory.java 2009-02-28 18:59:06 UTC (rev 5073) +++ trunk/fs/src/fs/org/jnode/fs/FSDirectory.java 2009-02-28 19:22:01 UTC (rev 5074) @@ -24,52 +24,68 @@ import java.util.Iterator; /** + * <tt>FSDirectory</tt> interface provide methods related to directory operations in a file system. + * * @author epr */ public interface FSDirectory extends FSObject { /** * Gets an iterator used to iterate over all the entries of this directory. - * All elements returned by the iterator must be instanceof FSEntry. + * All elements returned by the iterator must be instance of FSEntry. + * + * @return an iterator over the entries of this directory. + * + * @throws IOException if error occurs during iteration. */ public Iterator<? extends FSEntry> iterator() throws IOException; /** * Gets the entry with the given name. * - * @param name - * @throws IOException + * @param name identify the requested entry. + * + * @return {@link FSEntry} corresponding to the name passed as parameter. + * + * @throws IOException if no entry exists with this name. */ public FSEntry getEntry(String name) throws IOException; /** * Add a new file with a given name to this directory. * - * @param name - * @throws IOException + * @param name identify the new file. + * + * @return {@link FSEntry} corresponding to new created file. + * + * @throws IOException if a directory already exists with this name */ public FSEntry addFile(String name) throws IOException; /** * Add a new (sub-)directory with a given name to this directory. * - * @param name - * @throws IOException + * @param name identify the new directory. + * + * @return {@link FSEntry} corresponding to new created directory. + * + * @throws IOException if a directory already exists with this name. */ public FSEntry addDirectory(String name) throws IOException; /** * Remove the entry with the given name from this directory. * - * @param name - * @throws IOException + * @param name identify the entry that should be remove. + * + * @throws IOException if there is no entry with this name. */ public void remove(String name) throws IOException; /** - * Save all dirty (unsaved) data to the device + * Save all unsaved data to the device. * - * @throws IOException + * @throws IOException if error occurs during write of the data. */ public void flush() throws IOException; Modified: trunk/fs/src/fs/org/jnode/fs/FSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FSFile.java 2009-02-28 18:59:06 UTC (rev 5073) +++ trunk/fs/src/fs/org/jnode/fs/FSFile.java 2009-02-28 19:22:01 UTC (rev 5074) @@ -24,7 +24,7 @@ import java.nio.ByteBuffer; /** - * A FSFile is a representation of a single block of bytes on a filesystem. It + * A FSFile is a representation of a single block of bytes on a file system. It * is comparable to an inode in Unix. * * An FSFile does not have any knowledge of who is using this file. It is also @@ -36,46 +36,47 @@ public interface FSFile extends FSObject { /** - * Gets the length (in bytes) of this file + * Gets the length in bytes of this file. * - * @return long + * @return the number of byte in this file. */ public long getLength(); /** - * Sets the length of this file. + * Sets the length in bytes of this file. * - * @param length - * @throws IOException + * @param length the number of byte in this file. + * + * @throws IOException if error occurs during set of file's length. */ public void setLength(long length) throws IOException; /** - * Read <code>len</code> bytes from the given position. The read data is - * read fom this file starting at offset <code>fileOffset</code> and - * stored in <code>dest</code> starting at offset <code>ofs</code>. + * Read from this file starting at offset <code>fileOffset</code> and + * stored in <code>dest</code> byte buffer. * - * @param fileOffset - * @param dest - * @throws IOException + * @param fileOffset position in the file where the read begins. + * @param dest {@link ByteBuffer} receive contains of the file. + * + * @throws IOException if error occurs during reading of the data. */ public void read(long fileOffset, ByteBuffer dest) throws IOException; /** - * Write <code>len</code> bytes to the given position. The data is read - * from <code>src</code> starting at offset <code>ofs</code> and written - * to this file starting at offset <code>fileOffset</code>. + * Read bytes from <code>src</code> byte buffer and written + * to this file starting at offset <code>fileOffset</code> * - * @param fileOffset - * @param src - * @throws IOException + * @param fileOffset position in the file where datas are written. + * @param src {@link ByteBuffer} contains datas to write. + * + * @throws IOException if error occurs during write of the datas. */ public void write(long fileOffset, ByteBuffer src) throws IOException; /** - * Flush any cached data to the disk. + * Save all unsaved datas from the cache to the device. * - * @throws IOException + * @throws IOException if error occurs during flush of datas. */ public void flush() throws IOException; } Modified: trunk/fs/src/fs/org/jnode/fs/FileSystemType.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FileSystemType.java 2009-02-28 18:59:06 UTC (rev 5073) +++ trunk/fs/src/fs/org/jnode/fs/FileSystemType.java 2009-02-28 19:22:01 UTC (rev 5074) @@ -17,28 +17,37 @@ * along with this library; If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + package org.jnode.fs; import org.jnode.driver.Device; /** - * Descriptor and entry point for a class of filesystems. + * Descriptor and entry point for a class of file systems. * + * @param <T> {@link FileSystem} + * * @author epr + * */ public interface FileSystemType<T extends FileSystem<?>> { /** * Gets the unique name of this file system type. + * + * @return name of the file system. */ public String getName(); /** - * Create a filesystem from a given device. + * Create a file system from a given device. * - * @param device - * @param readOnly + * @param device {@link Device} contains the file system. + * @param readOnly set to <tt>true</tt> if the new file system must be read + * only. + * @return a file system + * @throws FileSystemException if error occurs during creation of the new + * file system. */ public T create(Device device, boolean readOnly) throws FileSystemException; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2009-02-28 19:45:49
|
Revision: 5075 http://jnode.svn.sourceforge.net/jnode/?rev=5075&view=rev Author: galatnm Date: 2009-02-28 19:45:46 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Correct and improve javadocs. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/FSEntry.java trunk/fs/src/fs/org/jnode/fs/Formatter.java trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java Modified: trunk/fs/src/fs/org/jnode/fs/FSEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FSEntry.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/FSEntry.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -34,11 +34,15 @@ /** * Gets the name of this entry. + * + * @return name of the entry. */ public String getName(); /** * Gets the directory this entry is a part of. + * + * @return {@link FSDirectory} that is the parent of the entry. */ public FSDirectory getParent(); @@ -46,61 +50,77 @@ * Gets the last modification time of this entry. * * @return the last modification time of the entry as milliseconds since 1970, or {@code 0} - * if this filesystem does not support getting the last modified time. + * if this files ystem does not support getting the last modified time. + * * @throws IOException if an error occurs retrieving the timestamp. */ public long getLastModified() throws IOException; /** - * Is this entry refering to a file? + * Returns <tt>true</tt> if this entry refering to a file. + * + * @return <tt>true</tt> if this entry refering to a file. */ public boolean isFile(); /** - * Is this entry refering to a (sub-)directory? + * Returns <tt>true</tt> if this entry refering to a (sub-)directory. + * + * @return <tt>true</tt> if this entry refering to a (sub-)directory. */ public boolean isDirectory(); /** * Sets the name of this entry. + * + * @param newName new name that identify the entry. + * + * @throws IOException if name already used. */ public void setName(String newName) throws IOException; /** * Gets the last modification time of this entry. * - * @throws IOException + * @param lastModified the last modified time of the entry in millisecond. + * + * @throws IOException if error occurs during set of the timestamp. */ public void setLastModified(long lastModified) throws IOException; /** - * Gets the file this entry refers to. This method can only be called if - * <code>isFile</code> returns true. + * Gets the file this entry refers to. * - * @return The file described by this entry + * @return The file described by this entry. + * + * @throws IOException if entry is not a file. */ public FSFile getFile() throws IOException; /** - * Gets the directory this entry refers to. This method can only be called - * if <code>isDirectory</code> returns true. + * Gets the directory this entry refers to. * - * @return The directory described by this entry + * @return The directory described by this entry. + * + * @throws IOException of entry is not a directory. */ public FSDirectory getDirectory() throws IOException; /** - * Gets the accessrights for this entry. + * Gets the access rights for this entry. * - * @throws IOException + * @return {@link FSAccessRights} represent rights for this entry. + * + * @throws IOException if access rights are unavailable. */ public FSAccessRights getAccessRights() throws IOException; /** - * Indicate if the entry has been modified in memory (ie need to be saved) + * Returns <tt>true</tt> if the entry has been modified in memory and need to be saved. * - * @return true if the entry need to be saved - * @throws IOException + * @return <tt>true</tt> if the entry need to be saved + * + * @throws IOException if error occurs during retrieving of the state of the entry. */ public boolean isDirty() throws IOException; } Modified: trunk/fs/src/fs/org/jnode/fs/Formatter.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/Formatter.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/Formatter.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -26,7 +26,7 @@ * * @author Fabien DUMINY (fduminy at jnode.org) * - * @param <T> + * @param <T> a file system implementation. */ public abstract class Formatter<T extends FileSystem<?>> implements Cloneable { private final FileSystemType<T> type; @@ -39,11 +39,18 @@ * Format the given device * * @param device The device we want to format + * * @return the newly created FileSystem - * @throws FileSystemException + * + * @throws FileSystemException if error occurs during formating of the device */ public abstract T format(Device device) throws FileSystemException; + /** + * Gets type of the formated file system. + * + * @return type of the file system. + */ public final FileSystemType<T> getFileSystemType() { return type; } Modified: trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -23,18 +23,28 @@ import java.io.IOException; /** + * New exception allowing to handle cases where a FileSystem is mounted readOnly + * * @author Fabien DUMINY * - * New exception allowing to handle cases where a FileSystem is mounted readOnly + * */ +@SuppressWarnings("serial") public class ReadOnlyFileSystemException extends IOException { - + /** + * Constructs a {@code ReadOnlyFileSystemException} with + * a default error message. + */ public ReadOnlyFileSystemException() { - super("read-only file system"); + super("The file system is flagged as read-only. No modifications allowed."); } + /** - * @param message - * @param cause + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified cause and message. + * + * @param message the detail message of the exception. + * @param cause the cause of the exception. */ public ReadOnlyFileSystemException(String message, Throwable cause) { super(message); @@ -42,7 +52,10 @@ } /** - * @param cause + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified cause. + * + * @param cause the cause of the exception. */ public ReadOnlyFileSystemException(Throwable cause) { super(); @@ -50,7 +63,10 @@ } /** - * @param message + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified message. + * + * @param message the detail message of the exception. */ public ReadOnlyFileSystemException(String message) { super(message); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2009-03-24 14:08:43
|
Revision: 5150 http://jnode.svn.sourceforge.net/jnode/?rev=5150&view=rev Author: crawley Date: 2009-03-24 14:08:37 +0000 (Tue, 24 Mar 2009) Log Message: ----------- Javadoc fixes Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/iso9660/Descriptor.java trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java trunk/fs/src/fs/org/jnode/fs/iso9660/VolumeDescriptor.java trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java trunk/fs/src/fs/org/jnode/fs/jarfs/JarFileSystem.java trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java trunk/fs/src/fs/org/jnode/fs/jifs/files/JIFSFthread.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSVolume.java trunk/fs/src/fs/org/jnode/fs/service/FileSystemService.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/Descriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/Descriptor.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/Descriptor.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -38,7 +38,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned byte */ protected static final int getUInt8(byte[] buffer, int bp) { return LittleEndian.getUInt8(buffer, bp - 1); @@ -49,7 +49,7 @@ * * @param buffer * @param bp - * @return + * @return a signed byte */ protected static final int getInt8(byte[] buffer, int bp) { return LittleEndian.getInt8(buffer, bp - 1); @@ -60,7 +60,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned little-endian short */ protected static final int getUInt16LE(byte[] buffer, int bp) { return LittleEndian.getUInt16(buffer, bp - 1); @@ -71,7 +71,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned big-endian short */ protected static final int getUInt16BE(byte[] buffer, int bp) { return BigEndian.getUInt16(buffer, bp - 1); @@ -82,7 +82,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned short */ protected static final int getUInt16Both(byte[] buffer, int bp) { return LittleEndian.getUInt16(buffer, bp - 1); @@ -93,7 +93,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned little-endian int */ protected static final long getUInt32LE(byte[] buffer, int bp) { return LittleEndian.getUInt32(buffer, bp - 1); @@ -104,7 +104,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned big-endian int */ protected static final long getUInt32BE(byte[] buffer, int bp) { return BigEndian.getUInt32(buffer, bp - 1); @@ -115,7 +115,7 @@ * * @param buffer * @param bp - * @return + * @return an unsigned int */ protected static final long getUInt32Both(byte[] buffer, int bp) { return LittleEndian.getUInt32(buffer, bp - 1); @@ -127,7 +127,7 @@ * @param buffer * @param bp * @param length - * @return + * @return the String representation */ protected static final String getAChars(byte[] buffer, int bp, int length) { return new String(buffer, bp - 1, length).trim(); @@ -139,7 +139,7 @@ * @param buffer * @param bp * @param length - * @return + * @return the String representation */ protected static final String getDChars(byte[] buffer, int bp, int length) { return new String(buffer, bp - 1, length).trim(); @@ -151,7 +151,8 @@ * @param buffer * @param bp * @param length - * @return + * @param encoding + * @return the String representation */ protected static final String getAChars(byte[] buffer, int bp, int length, String encoding) throws UnsupportedEncodingException { @@ -164,7 +165,7 @@ * @param buffer * @param bp * @param length - * @return + * @return the String representation */ protected static final String getDChars(byte[] buffer, int bp, int length, String encoding) throws UnsupportedEncodingException { Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -57,9 +57,8 @@ } /** - * @see org.jnode.fs.FSFile#read(long, byte[], int, int) + * @see org.jnode.fs.FSFile#read(long, ByteBuffer) */ - // public void read(long fileOffset, byte[] dest, int off, int len) public void read(long fileOffset, ByteBuffer destBuf) throws IOException { //TODO optimize it also to use ByteBuffer at lower level final ByteBufferUtils.ByteArray destBA = ByteBufferUtils.toByteArray(destBuf); @@ -69,9 +68,8 @@ } /** - * @see org.jnode.fs.FSFile#write(long, byte[], int, int) + * @see org.jnode.fs.FSFile#write(long, ByteBuffer) */ - //public void write(long fileOffset, byte[] src, int off, int len) public void write(long fileOffset, ByteBuffer src) throws IOException { throw new UnsupportedOperationException("Not yet implemented"); } Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -116,7 +116,7 @@ /** * Gets a derived encoding name from the given escape sequences. * @param escapeSequences - * @return + * @return the encoding name */ private String getEncoding(String escapeSequences) throws UnsupportedEncodingException { if (escapeSequences.equals("%/@")) { Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/VolumeDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/VolumeDescriptor.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/VolumeDescriptor.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -60,10 +60,10 @@ } /** - * Gets the type of volume descriptor from the buffer. + * Gets the type of the volume descriptor in the supplied buffer. * * @param buffer - * @return + * @return the type */ public static final int getType(byte[] buffer) { return getUInt8(buffer, 1); Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -60,7 +60,7 @@ } /** - * @see org.jnode.fs.FSFile#read(long, byte[], int, int) + * @see org.jnode.fs.FSFile#read(long, ByteBuffer) */ public void read(long fileOffset, ByteBuffer destBuf) throws IOException { final JarFileSystem fs = (JarFileSystem) getFileSystem(); @@ -74,7 +74,7 @@ } /** - * @see org.jnode.fs.FSFile#write(long, byte[], int, int) + * @see org.jnode.fs.FSFile#write(long, ByteBuffer) */ public void write(long fileOffset, ByteBuffer src) throws IOException { throw new ReadOnlyFileSystemException("Not yet implemented"); Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/JarFileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/JarFileSystem.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/JarFileSystem.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -56,24 +56,15 @@ return jarFile; } - /** - * - */ protected FSFile createFile(FSEntry entry) { return new JarFSFile((JarFSEntry) entry); } - /** - * - */ protected FSDirectory createDirectory(FSEntry entry) { Map<String, JarFSEntry> entries = cache.getChildEntries((JarFSEntry) entry); return new JarFSDirectory((JarFSEntry) entry, entries); } - /** - * - */ protected JarFSEntry createRootEntry() { return rootEntry; } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -342,8 +342,7 @@ } /** - * - * @return + * @return the FAT size / type */ public int fatSize() { return type; Modified: trunk/fs/src/fs/org/jnode/fs/jifs/files/JIFSFthread.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/files/JIFSFthread.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/jifs/files/JIFSFthread.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -39,8 +39,8 @@ /** * Creates the file, which contains information about the given Thread. * - * @param String name Filename. - * @param Thread t The Thread, whose information is presented via this file. + * @param name file's name + * @param t the Thread whose information is presented via this file. * @param parent Parent FSEntry, in this case it is an instance of * JIFSDplugins. */ Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSAttribute.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSAttribute.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -135,10 +135,6 @@ } /** - * @return Returns the volume. - */ - - /** * @return Returns the fileRecord. */ public FileRecord getFileRecord() { @@ -155,7 +151,7 @@ /** * Gets the length of this attribute in bytes. * - * @return + * @return the length */ public int getSize() { return getUInt32AsInt(4); @@ -166,7 +162,7 @@ * * @param fileRecord * @param offset - * @return + * @return the attribute */ public static NTFSAttribute getAttribute(FileRecord fileRecord, int offset) { final boolean resident = (fileRecord.getUInt8(offset + 0x08) == 0); Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSVolume.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSVolume.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSVolume.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -106,7 +106,7 @@ /** * Gets the size of a cluster. * - * @return + * @return the size */ public int getClusterSize() { return clusterSize; @@ -140,7 +140,7 @@ /** * Gets the root directory on this volume. * - * @return + * @return the root directory record * @throws IOException */ public FileRecord getRootDirectory() throws IOException { Modified: trunk/fs/src/fs/org/jnode/fs/service/FileSystemService.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/FileSystemService.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/service/FileSystemService.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -74,13 +74,12 @@ * Gets the filesystem registered on the given device. * * @param device - * @return null if no filesystem was found. + * @return {@code null} if no filesystem was found. */ public FileSystem<?> getFileSystem(Device device); /** - * Gets all registered filesystems. All instances of the returned collection - * are instanceof FileSystem. + * Gets all registered filesystems. */ public Collection<FileSystem<?>> fileSystems(); @@ -104,7 +103,7 @@ /** * Return a map of devices and their mount points. * - * @return + * @return the map */ public Map<String, String> getDeviceMountPoints(); @@ -112,7 +111,7 @@ * Is the given directory a mount. * * @param fullPath - * @return + * @return {@code true} if the directory is a mount, otherwise {@code false} */ public boolean isMount(String fullPath); Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2009-03-24 13:40:22 UTC (rev 5149) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2009-03-24 14:08:37 UTC (rev 5150) @@ -128,8 +128,7 @@ } /** - * Gets all registered filesystems. All instances of the returned collection - * are instanceof FileSystem. + * Gets all registered filesystems. */ public Collection<FileSystem<?>> fileSystems() { return fsm.fileSystems(); @@ -158,10 +157,6 @@ return api.getMountPoints(); } - /* - * (non-Javadoc) - * @see org.jnode.fs.service.FileSystemService#getDeviceMountPoints() - */ public Map<String, String> getDeviceMountPoints() { Map<String, FileSystem<?>> mounts = api.getMountPoints(); Map<String, String> result = new TreeMap<String, String>(); @@ -175,7 +170,7 @@ /** * Is the given directory a mount. * @param fullPath - * @return + * @return {@code true} if the director is a mount, otherwise {@code false}. */ public boolean isMount(String fullPath) { return api.isMount(VMFile.getNormalizedPath(fullPath)); @@ -224,9 +219,6 @@ } } - /** - * @see org.jnode.fs.service.FileSystemService#getFileSystemType(java.lang.String) - */ public <T extends FileSystemType<?>> T getFileSystemType(Class<T> name) throws FileSystemException { T result = fsTypeManager.getSystemType(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2009-04-27 14:14:33
|
Revision: 5352 http://jnode.svn.sourceforge.net/jnode/?rev=5352&view=rev Author: galatnm Date: 2009-04-27 14:14:23 +0000 (Mon, 27 Apr 2009) Log Message: ----------- Fix various NullPointerException. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-04-27 14:06:10 UTC (rev 5351) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-04-27 14:14:23 UTC (rev 5352) @@ -87,7 +87,19 @@ } private final FSEntry createFileEntry(final String name) throws IOException { - // TODO + /*if (fs.isReadOnly()) { + throw new ReadOnlyFileSystemException(); + } + Catalog catalog = fs.getCatalog(); + Superblock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader(); + LeafRecord fileRecord = catalog.createNode(name, this.folder + .getFolderId(), new CatalogNodeId(volumeHeader.getNextCatalogId()), CatalogFile.RECORD_TYPE_FILE); + + HFSPlusEntry newEntry = new HFSPlusFile(fs, this, name, folderRecord); + newEntry.setDirty(); + volumeHeader.setFileCount(volumeHeader.getFileCount() + 1); + log.debug("New volume header :\n" + volumeHeader.toString());*/ + return null; } @@ -114,8 +126,7 @@ @Override public Iterator<? extends FSEntry> iterator() throws IOException { - // TODO Auto-generated method stub - return null; + return entries.iterator(); } public int rename(String oldName, String newName) { @@ -215,8 +226,10 @@ Superblock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader(); LeafRecord folderRecord = catalog.createNode(name, this.folder.getFolderId(), new CatalogNodeId(volumeHeader.getNextCatalogId()), CatalogFolder.RECORD_TYPE_FOLDER_THREAD); + folder.setValence(folder.getValence() + 1); HFSPlusEntry newEntry = new HFSPlusDirectory(fs, this, name, folderRecord); + newEntry.setDirty(); volumeHeader.setFolderCount(volumeHeader.getFolderCount() + 1); log.debug("New volume header :\n" + volumeHeader.toString()); Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2009-04-27 14:06:10 UTC (rev 5351) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2009-04-27 14:14:23 UTC (rev 5352) @@ -287,7 +287,9 @@ entryCache.setEntry(entryPath.toString(), child); entryPath.setLength(directoryPathSize); - list.add(name); + if(name != null){ + list.add(name); + } } return list.toArray(new String[list.size()]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2011-12-09 15:54:15
|
Revision: 5873 http://jnode.svn.sourceforge.net/jnode/?rev=5873&view=rev Author: galatnm Date: 2011-12-09 15:54:09 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Fix javadoc. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/jfat/command/MBRFormatter.java trunk/fs/src/fs/org/jnode/fs/jfat/command/Stage1_5.java trunk/fs/src/fs/org/jnode/fs/service/def/FSEntryCache.java trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleImpl.java Modified: trunk/fs/src/fs/org/jnode/fs/jfat/command/MBRFormatter.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/command/MBRFormatter.java 2011-12-09 15:48:02 UTC (rev 5872) +++ trunk/fs/src/fs/org/jnode/fs/jfat/command/MBRFormatter.java 2011-12-09 15:54:09 UTC (rev 5873) @@ -73,10 +73,8 @@ /** * - * @param device - * @param bsize - * @throws FileSystemException - * @throws IOException + * @param devApi + * @throws GrubException */ public void format(BlockDeviceAPI devApi) throws GrubException { Modified: trunk/fs/src/fs/org/jnode/fs/jfat/command/Stage1_5.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/command/Stage1_5.java 2011-12-09 15:48:02 UTC (rev 5872) +++ trunk/fs/src/fs/org/jnode/fs/jfat/command/Stage1_5.java 2011-12-09 15:54:09 UTC (rev 5873) @@ -193,7 +193,7 @@ * * @arch i386 * @param stage1_5 - * @param installPartition2 + * @param installPartition */ private void setLittleEnd_InstallPartition(byte[] stage1_5, int installPartition) { LittleEndian.setInt32(stage1_5, 512 + 0x08, installPartition); Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FSEntryCache.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FSEntryCache.java 2011-12-09 15:48:02 UTC (rev 5872) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FSEntryCache.java 2011-12-09 15:54:09 UTC (rev 5873) @@ -44,7 +44,6 @@ /** * Create a new instance * - * @param fsm */ public FSEntryCache() { } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleImpl.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleImpl.java 2011-12-09 15:48:02 UTC (rev 5872) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleImpl.java 2011-12-09 15:54:09 UTC (rev 5873) @@ -142,8 +142,6 @@ * stored in <code>dest</code> starting at offset <code>ofs</code>. * * @param dest - * @param off - * @param len * @throws IOException */ public synchronized int read(ByteBuffer dest) throws IOException { @@ -171,8 +169,6 @@ * to this file starting at offset <code>fileOffset</code>. * * @param src - * @param off - * @param len * @throws IOException */ // public synchronized void write(byte[] src, int off, int len) throws This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-04-19 15:53:00
|
Revision: 5897 http://jnode.svn.sourceforge.net/jnode/?rev=5897&view=rev Author: galatnm Date: 2012-04-19 15:52:49 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Filesystem code cleanup. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java Modified: trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -23,7 +23,6 @@ import java.io.File; import java.io.PrintWriter; import java.util.Map; - import org.jnode.driver.Device; import org.jnode.driver.block.BlockDeviceAPI; import org.jnode.fs.FileSystem; @@ -68,12 +67,12 @@ if (!argDevice.isSet()) { // List all mounted file systems Map<String, FileSystem<?>> filesystems = fss.getMountPoints(); - for (String mountPoint : filesystems.keySet()) { - FileSystem<?> fs = filesystems.get(mountPoint); + for (Map.Entry<String, FileSystem<?>> stringFileSystemEntry : filesystems.entrySet()) { + FileSystem<?> fs = stringFileSystemEntry.getValue(); Device device = fs.getDevice(); String mode = fs.isReadOnly() ? "ro" : "rw"; String type = fs.getType().getName(); - out.format(fmt_mount, device.getId(), mountPoint, type, mode); + out.format(fmt_mount, device.getId(), stringFileSystemEntry.getKey(), type, mode); } } else { // Get the parameters Modified: trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/fat/FatLfnDirectory.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -23,10 +23,10 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Vector; - import org.jnode.fs.FSEntry; import org.jnode.fs.ReadOnlyFileSystemException; @@ -171,9 +171,7 @@ for (LfnEntry currentEntry : shortNameIndex.values()) { FatBasicDirEntry[] encoded = currentEntry.compactForm(); - for (int i = 0; i < encoded.length; i++) { - destination.add(encoded[i]); - } + Collections.addAll(destination, encoded); } final int size = destination.size(); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,6 +22,7 @@ import java.io.IOException; import java.nio.ByteBuffer; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.apache.log4j.Logger; @@ -273,9 +274,7 @@ List<LeafRecord> lfList = new LinkedList<LeafRecord>(); for (IndexRecord rec : records) { LeafRecord[] lfr = getRecords(parentID, rec.getIndex()); - for (LeafRecord lr : lfr) { - lfList.add(lr); - } + Collections.addAll(lfList, lfr); } return lfList.toArray(new LeafRecord[lfList.size()]); } else if (nd.isLeafNode()) { Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/CompressedDataRun.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.Arrays; - import org.apache.log4j.Logger; import org.jnode.util.LittleEndian; @@ -311,9 +310,7 @@ (realSrcOffset < realDestOffset && realSrcOffset + length > realDestOffset || realDestOffset < realSrcOffset && realDestOffset + length > realSrcOffset)) { - for (int i = 0; i < length; i++) { - destArray[realDestOffset + i] = srcArray[realSrcOffset + i]; - } + System.arraycopy(srcArray, realSrcOffset + 0, destArray, realDestOffset + 0, length); return; } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemManager.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Map; - import org.jnode.driver.Device; import org.jnode.fs.FileSystem; @@ -33,8 +33,9 @@ */ final class FileSystemManager { /** All registed filesystems (device, fs) */ - private final Map<Device, FileSystem<?>> filesystems = new HashMap<Device, FileSystem<?>>(); + private Map<Device, FileSystem<?>> filesystems = Collections.synchronizedMap(new HashMap<Device, FileSystem<?>>()); + /** * Register a mounted filesystem * @@ -42,9 +43,7 @@ */ public void registerFileSystem(FileSystem<?> fs) { final Device device = fs.getDevice(); - synchronized (this) { - filesystems.put(device, fs); - } + filesystems.put(device, fs); } /** @@ -52,7 +51,7 @@ * * @param device */ - public synchronized FileSystem<?> unregisterFileSystem(Device device) { + public FileSystem<?> unregisterFileSystem(Device device) { return filesystems.remove(device); } @@ -62,7 +61,7 @@ * @param device * @return null if no filesystem was found. */ - public synchronized FileSystem<?> getFileSystem(Device device) { + public FileSystem<?> getFileSystem(Device device) { return filesystems.get(device); } @@ -70,7 +69,7 @@ * Gets all registered filesystems. All instances of the returned collection * are instanceof FileSystem. */ - public synchronized Collection<FileSystem<?>> fileSystems() { + public Collection<FileSystem<?>> fileSystems() { return new ArrayList<FileSystem<?>>(filesystems.values()); } } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2012-04-19 12:57:10 UTC (rev 5896) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemPlugin.java 2012-04-19 15:52:49 UTC (rev 5897) @@ -22,17 +22,14 @@ import java.io.IOException; import java.io.VMFile; -import org.jnode.java.io.VMFileSystemAPI; import java.io.VMIOUtils; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Collection; import java.util.Map; import java.util.TreeMap; - import javax.naming.NameNotFoundException; import javax.naming.NamingException; - import org.apache.log4j.Logger; import org.jnode.driver.Device; import org.jnode.driver.DeviceAlreadyRegisteredException; @@ -42,6 +39,7 @@ import org.jnode.fs.FileSystemException; import org.jnode.fs.FileSystemType; import org.jnode.fs.service.FileSystemService; +import org.jnode.java.io.VMFileSystemAPI; import org.jnode.naming.InitialNaming; import org.jnode.plugin.Plugin; import org.jnode.plugin.PluginDescriptor; @@ -160,9 +158,9 @@ public Map<String, String> getDeviceMountPoints() { Map<String, FileSystem<?>> mounts = api.getMountPoints(); Map<String, String> result = new TreeMap<String, String>(); - for (String path : mounts.keySet()) { - FileSystem<?> fs = (FileSystem<?>) mounts.get(path); - result.put(fs.getDevice().getId(), path); + for (Map.Entry<String, FileSystem<?>> stringFileSystemEntry : mounts.entrySet()) { + FileSystem<?> fs = (FileSystem<?>) stringFileSystemEntry.getValue(); + result.put(fs.getDevice().getId(), stringFileSystemEntry.getKey()); } return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ga...@us...> - 2012-08-10 07:28:43
|
Revision: 5926 http://jnode.svn.sourceforge.net/jnode/?rev=5926&view=rev Author: galatnm Date: 2012-08-10 07:28:37 +0000 (Fri, 10 Aug 2012) Log Message: ----------- Ext4 code review changes Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Constants.java trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java trunk/fs/src/fs/org/jnode/fs/ext2/INode.java Added Paths: ----------- trunk/fs/src/fs/org/jnode/fs/ext4/ trunk/fs/src/fs/org/jnode/fs/ext4/Extent.java trunk/fs/src/fs/org/jnode/fs/ext4/ExtentHeader.java trunk/fs/src/fs/org/jnode/fs/ext4/ExtentIndex.java Removed Paths: ------------- trunk/fs/src/fs/org/jnode/fs/ext2/Extent.java trunk/fs/src/fs/org/jnode/fs/ext2/ExtentHeader.java trunk/fs/src/fs/org/jnode/fs/ext2/ExtentIndex.java Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Constants.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Constants.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Constants.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -94,10 +94,10 @@ public static final long EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER = 0x0001; public static final long EXT2_FEATURE_RO_COMPAT_LARGE_FILE = 0x0002; public static final long EXT2_FEATURE_RO_COMPAT_BTREE_DIR = 0x0004; - public static final long EXT4_FEATURE_ROCOMPAT_HUGE_FILE = 0x0008; - public static final long EXT4_FEATURE_ROCOMPAT_GDT_CSUM = 0x0010; - public static final long EXT4_FEATURE_ROCOMPAT_DIR_NLINK = 0x0020; - public static final long EXT4_FEATURE_ROCOMPAT_EXTRA_ISIZE = 0x0040; + public static final long EXT4_FEATURE_RO_COMPAT_HUGE_FILE = 0x0008; + public static final long EXT4_FEATURE_RO_COMPAT_GDT_CSUM = 0x0010; + public static final long EXT4_FEATURE_RO_COMPAT_DIR_NLINK = 0x0020; + public static final long EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE = 0x0040; // S_FEATURE_INCOMPAT constants public static final long EXT2_FEATURE_INCOMPAT_COMPRESSION = 0x0001; Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -151,19 +151,19 @@ log.info(getDevice().getId() + " Unsupported filesystem feature (BTREE_DIR) forces readonly mode"); setReadOnly(true); } - if (hasROFeature(Ext2Constants.EXT4_FEATURE_ROCOMPAT_HUGE_FILE)) { + if (hasROFeature(Ext2Constants.EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) { log.info(getDevice().getId() + " Unsupported filesystem feature (HUGE_FILE) forces readonly mode"); setReadOnly(true); } - if (hasROFeature(Ext2Constants.EXT4_FEATURE_ROCOMPAT_GDT_CSUM)) { + if (hasROFeature(Ext2Constants.EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) { log.info(getDevice().getId() + " Unsupported filesystem feature (GDT_CSUM) forces readonly mode"); setReadOnly(true); } - if (hasROFeature(Ext2Constants.EXT4_FEATURE_ROCOMPAT_DIR_NLINK)) { + if (hasROFeature(Ext2Constants.EXT4_FEATURE_RO_COMPAT_DIR_NLINK)) { log.info(getDevice().getId() + " Unsupported filesystem feature (DIR_NLINK) forces readonly mode"); setReadOnly(true); } - if (hasROFeature(Ext2Constants.EXT4_FEATURE_ROCOMPAT_EXTRA_ISIZE)) { + if (hasROFeature(Ext2Constants.EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) { log.info(getDevice().getId() + " Unsupported filesystem feature (EXTRA_ISIZE) forces readonly mode"); setReadOnly(true); } @@ -348,7 +348,7 @@ * * @return data block nr */ - protected byte[] getBlock(long nr) throws IOException { + public byte[] getBlock(long nr) throws IOException { if (isClosed()) throw new IOException("FS closed (fs instance: " + this + ")"); // log.debug("blockCache size: "+blockCache.size()); Deleted: trunk/fs/src/fs/org/jnode/fs/ext2/Extent.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/Extent.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/Extent.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -1,55 +0,0 @@ -package org.jnode.fs.ext2; - -/** - * An ext4 extent object. - * - * @author Luke Quinane - */ -public class Extent { - /** - * The length of an extent. - */ - public static final int EXTENT_LENGTH = 12; - - /** - * The data for the extent. - */ - private byte[] data; - - /** - * Create an extent object. - * - * @param data the data for the extent. - */ - public Extent(byte[] data) { - this.data = new byte[EXTENT_LENGTH]; - System.arraycopy(data, 0, this.data, 0, EXTENT_LENGTH); - - // Safety check - if (getStartHigh() != 0) { - throw new UnsupportedOperationException("Extents that use the high bits aren't supported yet"); - } - } - - public long getBlockIndex() { - return Ext2Utils.get32(data, 0); - } - - public int getBlockCount() { - return Ext2Utils.get16(data, 4); - } - - public long getStartLow() { - return Ext2Utils.get32(data, 8); - } - - public int getStartHigh() { - return Ext2Utils.get16(data, 6); - } - - @Override - public String toString() { - return String.format("Extent: blockindex:%d count:%d start(low:%d high:%d)", getBlockIndex(), getBlockCount(), - getStartLow(), getStartHigh()); - } -} Deleted: trunk/fs/src/fs/org/jnode/fs/ext2/ExtentHeader.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/ExtentHeader.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/ExtentHeader.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -1,180 +0,0 @@ -package org.jnode.fs.ext2; - -import java.io.IOException; - -/** - * An ext4 extent header. - * - * @author Luke Quinane - */ -public class ExtentHeader { - /** - * The length of an extent header. - */ - public static final int EXTENT_HEADER_LENGTH = 12; - - /** - * The magic number for an extent header. - */ - public static final int MAGIC = 0xf30a; - - /** - * The data for the header. - */ - private byte[] data; - - /** - * The cache copy of the index entries. - */ - private ExtentIndex[] indexEntries; - - /** - * The cache copy of the extent entries. - */ - private Extent[] extentEntries; - - /** - * Create an extent header object. - */ - public ExtentHeader(byte[] data) throws IOException { - this.data = new byte[data.length]; - System.arraycopy(data, 0, this.data, 0, data.length); - - if (getMagic() != ExtentHeader.MAGIC) { - throw new IOException("Extent had the wrong magic: " + getMagic()); - } - } - - public int getMagic() { - return Ext2Utils.get16(data, 0); - } - - public int getEntryCount() { - return Ext2Utils.get16(data, 2); - } - - public int getMaximumEntryCount() { - return Ext2Utils.get16(data, 4); - } - - public int getDepth() { - return Ext2Utils.get16(data, 6); - } - - public ExtentIndex[] getIndexEntries() { - if (getDepth() == 0) { - throw new IllegalStateException("Trying to read index entries from a leaf."); - } - - if (indexEntries == null) { - indexEntries = new ExtentIndex[getEntryCount()]; - int offset = EXTENT_HEADER_LENGTH; - - for (int i = 0; i < getEntryCount(); i++) { - byte[] indexBuffer = new byte[ExtentIndex.EXTENT_INDEX_LENGTH]; - System.arraycopy(data, offset, indexBuffer, 0, indexBuffer.length); - - indexEntries[i] = new ExtentIndex(indexBuffer); - offset += ExtentIndex.EXTENT_INDEX_LENGTH; - } - } - - return indexEntries; - } - - public Extent[] getExtentEntries() { - if (getDepth() != 0) { - throw new IllegalStateException("Trying to read extent entries from a non-leaf."); - } - - if (extentEntries == null) { - extentEntries = new Extent[getEntryCount()]; - int offset = EXTENT_HEADER_LENGTH; - - for (int i = 0; i < getEntryCount(); i++) { - byte[] indexBuffer = new byte[Extent.EXTENT_LENGTH]; - System.arraycopy(data, offset, indexBuffer, 0, indexBuffer.length); - - extentEntries[i] = new Extent(indexBuffer); - offset += Extent.EXTENT_LENGTH; - } - } - - return extentEntries; - } - - public long getBlockNumber(Ext2FileSystem fs, long index) throws IOException { - if (getDepth() > 0) { - ExtentIndex extentIndex = binarySearchIndexes(index, getIndexEntries()); - byte[] indexData = fs.getBlock(extentIndex.getLeafLow()); - - ExtentHeader indexHeader = new ExtentHeader(indexData); - return indexHeader.getBlockNumber(fs, index); - } - else { - Extent extent = binarySearchExtents(index, getExtentEntries()); - return index - extent.getBlockIndex() + extent.getStartLow(); - } - } - - /** - * Performs a binary search in the extent indexes. - * - * @param index the index of the block to match. - * @param indexes the indexes to search in. - * @return the matching index. - */ - private ExtentIndex binarySearchIndexes(long index, ExtentIndex[] indexes) - { - int lowIndex = 0; - int highIndex = indexes.length - 1; - ExtentIndex extentIndex = null; - - while (lowIndex <= highIndex) { - int middle = lowIndex + (highIndex - lowIndex) / 2; - extentIndex = indexes[middle]; - - if (index < extentIndex.getBlockIndex()) { - highIndex = middle - 1; - } - else { - lowIndex = middle + 1; - } - } - - return indexes[Math.max(0, lowIndex - 1)]; - } - - /** - * Performs a binary search in the extents. - * - * @param index the index of the block to match. - * @param extents the extents to search in. - * @return the matching extent. - */ - private Extent binarySearchExtents(long index, Extent[] extents) - { - int lowIndex = 0; - int highIndex = extents.length - 1; - Extent extent = null; - - while (lowIndex <= highIndex) { - int middle = lowIndex + (highIndex - lowIndex) / 2; - extent = extents[middle]; - - if (index < extent.getBlockIndex()) { - highIndex = middle - 1; - } - else { - lowIndex = middle + 1; - } - } - - return extents[Math.max(0, lowIndex - 1)]; - } - - @Override - public String toString() { - return String.format("ExtentHeader: depth:%d entries:%d/%d", getDepth(), getEntryCount(), getMaximumEntryCount()); - } -} Deleted: trunk/fs/src/fs/org/jnode/fs/ext2/ExtentIndex.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/ExtentIndex.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/ExtentIndex.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -1,51 +0,0 @@ -package org.jnode.fs.ext2; - -/** - * An ext4 extent index. - * - * @author Luke Quinane - */ -public class ExtentIndex { - /** - * The length of an extent index. - */ - public static final int EXTENT_INDEX_LENGTH = 12; - - /** - * The data for the index. - */ - private byte[] data; - - /** - * Create an extent index object. - * - * @param data the data for the index. - */ - public ExtentIndex(byte[] data) { - this.data = new byte[EXTENT_INDEX_LENGTH]; - System.arraycopy(data, 0, this.data, 0, EXTENT_INDEX_LENGTH); - - // Safety check - if (getLeafHigh() != 0) { - throw new UnsupportedOperationException("Extent indexes that use the high bits aren't supported yet"); - } - } - - public long getBlockIndex() { - return Ext2Utils.get32(data, 0); - } - - public long getLeafLow() { - return Ext2Utils.get32(data, 4); - } - - public int getLeafHigh() { - return Ext2Utils.get16(data, 8); - } - - @Override - public String toString() { - return String.format("ExtentIndex: blockindex:%d leaf(low:%d high:%d)", getBlockIndex(), getLeafLow(), - getLeafHigh()); - } -} Modified: trunk/fs/src/fs/org/jnode/fs/ext2/INode.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/INode.java 2012-08-10 07:26:22 UTC (rev 5925) +++ trunk/fs/src/fs/org/jnode/fs/ext2/INode.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -26,6 +26,7 @@ import org.apache.log4j.Logger; import org.jnode.fs.FileSystemException; import org.jnode.fs.ext2.exception.UnallocatedBlockException; +import org.jnode.fs.ext4.ExtentHeader; /** * This class represents an inode. Once they are allocated, inodes are read and Added: trunk/fs/src/fs/org/jnode/fs/ext4/Extent.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext4/Extent.java (rev 0) +++ trunk/fs/src/fs/org/jnode/fs/ext4/Extent.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -0,0 +1,57 @@ +package org.jnode.fs.ext4; + +import org.jnode.fs.ext2.Ext2Utils; + +/** + * An ext4 extent object. + * + * @author Luke Quinane + */ +public class Extent { + /** + * The length of an extent. + */ + public static final int EXTENT_LENGTH = 12; + + /** + * The data for the extent. + */ + private byte[] data; + + /** + * Create an extent object. + * + * @param data the data for the extent. + */ + public Extent(byte[] data) { + this.data = new byte[EXTENT_LENGTH]; + System.arraycopy(data, 0, this.data, 0, EXTENT_LENGTH); + + // Safety check + if (getStartHigh() != 0) { + throw new UnsupportedOperationException("Extents that use the high bits aren't supported yet"); + } + } + + public long getBlockIndex() { + return Ext2Utils.get32(data, 0); + } + + public int getBlockCount() { + return Ext2Utils.get16(data, 4); + } + + public long getStartLow() { + return Ext2Utils.get32(data, 8); + } + + public int getStartHigh() { + return Ext2Utils.get16(data, 6); + } + + @Override + public String toString() { + return String.format("Extent: blockindex:%d count:%d start(low:%d high:%d)", getBlockIndex(), getBlockCount(), + getStartLow(), getStartHigh()); + } +} Added: trunk/fs/src/fs/org/jnode/fs/ext4/ExtentHeader.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext4/ExtentHeader.java (rev 0) +++ trunk/fs/src/fs/org/jnode/fs/ext4/ExtentHeader.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -0,0 +1,182 @@ +package org.jnode.fs.ext4; + +import java.io.IOException; +import org.jnode.fs.ext2.Ext2FileSystem; +import org.jnode.fs.ext2.Ext2Utils; + +/** + * An ext4 extent header. + * + * @author Luke Quinane + */ +public class ExtentHeader { + /** + * The length of an extent header. + */ + public static final int EXTENT_HEADER_LENGTH = 12; + + /** + * The magic number for an extent header. + */ + public static final int MAGIC = 0xf30a; + + /** + * The data for the header. + */ + private final byte[] data; + + /** + * The cache copy of the index entries. + */ + private ExtentIndex[] indexEntries; + + /** + * The cache copy of the extent entries. + */ + private Extent[] extentEntries; + + /** + * Create an extent header object. + */ + public ExtentHeader(byte[] data) throws IOException { + this.data = new byte[data.length]; + System.arraycopy(data, 0, this.data, 0, data.length); + + if (getMagic() != ExtentHeader.MAGIC) { + throw new IOException("Extent had the wrong magic: " + getMagic()); + } + } + + public int getMagic() { + return Ext2Utils.get16(data, 0); + } + + public int getEntryCount() { + return Ext2Utils.get16(data, 2); + } + + public int getMaximumEntryCount() { + return Ext2Utils.get16(data, 4); + } + + public int getDepth() { + return Ext2Utils.get16(data, 6); + } + + public ExtentIndex[] getIndexEntries() { + if (getDepth() == 0) { + throw new IllegalStateException("Trying to read index entries from a leaf."); + } + + if (indexEntries == null) { + indexEntries = new ExtentIndex[getEntryCount()]; + int offset = EXTENT_HEADER_LENGTH; + + for (int i = 0; i < getEntryCount(); i++) { + byte[] indexBuffer = new byte[ExtentIndex.EXTENT_INDEX_LENGTH]; + System.arraycopy(data, offset, indexBuffer, 0, indexBuffer.length); + + indexEntries[i] = new ExtentIndex(indexBuffer); + offset += ExtentIndex.EXTENT_INDEX_LENGTH; + } + } + + return indexEntries; + } + + public Extent[] getExtentEntries() { + if (getDepth() != 0) { + throw new IllegalStateException("Trying to read extent entries from a non-leaf."); + } + + if (extentEntries == null) { + extentEntries = new Extent[getEntryCount()]; + int offset = EXTENT_HEADER_LENGTH; + + for (int i = 0; i < getEntryCount(); i++) { + byte[] indexBuffer = new byte[Extent.EXTENT_LENGTH]; + System.arraycopy(data, offset, indexBuffer, 0, indexBuffer.length); + + extentEntries[i] = new Extent(indexBuffer); + offset += Extent.EXTENT_LENGTH; + } + } + + return extentEntries; + } + + public long getBlockNumber(Ext2FileSystem fs, long index) throws IOException { + if (getDepth() > 0) { + ExtentIndex extentIndex = binarySearchIndexes(index, getIndexEntries()); + byte[] indexData = fs.getBlock(extentIndex.getLeafLow()); + + ExtentHeader indexHeader = new ExtentHeader(indexData); + return indexHeader.getBlockNumber(fs, index); + } + else { + Extent extent = binarySearchExtents(index, getExtentEntries()); + return index - extent.getBlockIndex() + extent.getStartLow(); + } + } + + /** + * Performs a binary search in the extent indexes. + * + * @param index the index of the block to match. + * @param indexes the indexes to search in. + * @return the matching index. + */ + private ExtentIndex binarySearchIndexes(long index, ExtentIndex[] indexes) + { + int lowIndex = 0; + int highIndex = indexes.length - 1; + ExtentIndex extentIndex = null; + + while (lowIndex <= highIndex) { + int middle = lowIndex + (highIndex - lowIndex) / 2; + extentIndex = indexes[middle]; + + if (index < extentIndex.getBlockIndex()) { + highIndex = middle - 1; + } + else { + lowIndex = middle + 1; + } + } + + return indexes[Math.max(0, lowIndex - 1)]; + } + + /** + * Performs a binary search in the extents. + * + * @param index the index of the block to match. + * @param extents the extents to search in. + * @return the matching extent. + */ + private Extent binarySearchExtents(long index, Extent[] extents) + { + int lowIndex = 0; + int highIndex = extents.length - 1; + Extent extent = null; + + while (lowIndex <= highIndex) { + int middle = lowIndex + (highIndex - lowIndex) / 2; + extent = extents[middle]; + + if (index < extent.getBlockIndex()) { + highIndex = middle - 1; + } + else { + lowIndex = middle + 1; + } + } + + return extents[Math.max(0, lowIndex - 1)]; + } + + @Override + public String toString() { + return String.format("ExtentHeader: depth:%d entries:%d/%d", getDepth(), getEntryCount(), getMaximumEntryCount()); + } +} Added: trunk/fs/src/fs/org/jnode/fs/ext4/ExtentIndex.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext4/ExtentIndex.java (rev 0) +++ trunk/fs/src/fs/org/jnode/fs/ext4/ExtentIndex.java 2012-08-10 07:28:37 UTC (rev 5926) @@ -0,0 +1,53 @@ +package org.jnode.fs.ext4; + +import org.jnode.fs.ext2.Ext2Utils; + +/** + * An ext4 extent index. + * + * @author Luke Quinane + */ +public class ExtentIndex { + /** + * The length of an extent index. + */ + public static final int EXTENT_INDEX_LENGTH = 12; + + /** + * The data for the index. + */ + private final byte[] data; + + /** + * Create an extent index object. + * + * @param data the data for the index. + */ + public ExtentIndex(byte[] data) { + this.data = new byte[EXTENT_INDEX_LENGTH]; + System.arraycopy(data, 0, this.data, 0, EXTENT_INDEX_LENGTH); + + // Safety check + if (getLeafHigh() != 0) { + throw new UnsupportedOperationException("Extent indexes that use the high bits aren't supported yet"); + } + } + + public long getBlockIndex() { + return Ext2Utils.get32(data, 0); + } + + public long getLeafLow() { + return Ext2Utils.get32(data, 4); + } + + public int getLeafHigh() { + return Ext2Utils.get16(data, 8); + } + + @Override + public String toString() { + return String.format("ExtentIndex: blockindex:%d leaf(low:%d high:%d)", getBlockIndex(), getLeafLow(), + getLeafHigh()); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2013-02-23 13:46:17
|
Revision: 5973 http://jnode.svn.sourceforge.net/jnode/?rev=5973&view=rev Author: lsantha Date: 2013-02-23 13:46:07 +0000 (Sat, 23 Feb 2013) Log Message: ----------- Updated headers. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java Modified: trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,58 +1,78 @@ -package org.jnode.fs.jfat; - -import java.io.IOException; -import org.jnode.driver.block.BlockDeviceAPI; - -/** - * A FAT implementation for FAT-16. - * - * @author Luke Quinane - */ -public class Fat16 extends Fat { - protected Fat16(BootSector bs, BlockDeviceAPI api) { - super(bs, api); - } - - protected long offset(int index) { - return (long) (2 * index); - } - - public int get(int index) throws IOException { - return (int) getUInt16(index); - } - - public int set(int index, int element) throws IOException { - long old = getUInt16(index); - - setInt16(index, element & 0xFFFF); - - return (int) (old & 0x0000FFFF); - } - - public long getClusterPosition(int index) { - BootSector bootSector = getBootSector(); - - long rootDirectoryOffset = bootSector.getFirstDataSector() * bootSector.getBytesPerSector(); - - if (index == 0) { - return rootDirectoryOffset; - } - - // Need to account for the size of the root directory entry for following clusters - long filesOffset = rootDirectoryOffset + bootSector.getNrRootDirEntries() * 32; - return filesOffset + ((index - firstCluster()) * getClusterSize()); - } - - @Override - public boolean hasNext(int entry) { - return !isEofChain(entry); - } - - public boolean isEofChain(int entry) { - return (entry >= 0xFFF8); - } - - public int eofChain() { - return 0xFFF8; - } -} +/* + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * + * Copyright (C) 2003-2013 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.fs.jfat; + +import java.io.IOException; +import org.jnode.driver.block.BlockDeviceAPI; + +/** + * A FAT implementation for FAT-16. + * + * @author Luke Quinane + */ +public class Fat16 extends Fat { + protected Fat16(BootSector bs, BlockDeviceAPI api) { + super(bs, api); + } + + protected long offset(int index) { + return (long) (2 * index); + } + + public int get(int index) throws IOException { + return (int) getUInt16(index); + } + + public int set(int index, int element) throws IOException { + long old = getUInt16(index); + + setInt16(index, element & 0xFFFF); + + return (int) (old & 0x0000FFFF); + } + + public long getClusterPosition(int index) { + BootSector bootSector = getBootSector(); + + long rootDirectoryOffset = bootSector.getFirstDataSector() * bootSector.getBytesPerSector(); + + if (index == 0) { + return rootDirectoryOffset; + } + + // Need to account for the size of the root directory entry for following clusters + long filesOffset = rootDirectoryOffset + bootSector.getNrRootDirEntries() * 32; + return filesOffset + ((index - firstCluster()) * getClusterSize()); + } + + @Override + public boolean hasNext(int entry) { + return !isEofChain(entry); + } + + public boolean isEofChain(int entry) { + return (entry >= 0xFFF8); + } + + public int eofChain() { + return 0xFFF8; + } +} Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id: header.txt 5714 2010-01-03 13:33:07Z lsantha $ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id: header.txt 5714 2010-01-03 13:33:07Z lsantha $ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id: header.txt 5714 2010-01-03 13:33:07Z lsantha $ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id: header.txt 5714 2010-01-03 13:33:07Z lsantha $ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id: header.txt 5714 2010-01-03 13:33:07Z lsantha $ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java 2013-02-23 12:56:03 UTC (rev 5972) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java 2013-02-23 13:46:07 UTC (rev 5973) @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ * - * Copyright (C) 2003-2012 JNode.org + * Copyright (C) 2003-2013 JNode.org * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -173,4 +173,4 @@ } } } -} \ No newline at end of file +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2013-02-23 13:54:30
|
Revision: 5974 http://jnode.svn.sourceforge.net/jnode/?rev=5974&view=rev Author: lsantha Date: 2013-02-23 13:54:18 +0000 (Sat, 23 Feb 2013) Log Message: ----------- Updated headers. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java Modified: trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/jfat/Fat16.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeNonRes.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListAttributeRes.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListBlock.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/AttributeListEntry.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSNonResidentAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/attribute/NTFSResidentAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexAllocationAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexBlock.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntry.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexEntryIterator.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexHeader.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRoot.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/IndexRootAttribute.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java 2013-02-23 13:46:07 UTC (rev 5973) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/index/NTFSIndex.java 2013-02-23 13:54:18 UTC (rev 5974) @@ -1,5 +1,5 @@ /* - * $Id: header.txt 5972 2013-02-23 12:56:03Z lsantha $ + * $Id$ * * Copyright (C) 2003-2013 JNode.org * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |