From: <cr...@us...> - 2009-03-26 11:51:03
|
Revision: 5156 http://jnode.svn.sourceforge.net/jnode/?rev=5156&view=rev Author: crawley Date: 2009-03-26 11:50:49 +0000 (Thu, 26 Mar 2009) Log Message: ----------- Javadoc fixes (and minor de-uglification) Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusForkData.java trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFile.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogThread.java trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/IndexNode.java trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafNode.java trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/NodeDescriptor.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusForkData.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusForkData.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusForkData.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -61,7 +61,7 @@ * * @param totalSize * @param clumpSize - * @param totalBock + * @param totalBlock */ public HFSPlusForkData(long totalSize, int clumpSize, int totalBlock) { this.totalSize = totalSize; @@ -85,11 +85,6 @@ return dest; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ public final String toString() { StringBuffer s = new StringBuffer(); s.append("Total size : ").append(totalSize).append("\n"); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -30,27 +30,27 @@ * Difference in second between 01/01/1970 00:00:00 (java reference time) * and 01/01/1904 00:00:00 (HFS reference time). */ - public static final long MAC_DATE_CONVERTION = 2082844800L; + public static final long MAC_DATE_CONVERSION = 2082844800L; /** * Convert time from/to java time to/from mac time. * * @param time in seconds since reference date. - * @param encode if set to true, convert from java to mac. If set to false, - * convert from mac to java. + * @param encode if {code true}, convert from java to mac, otherwise + * convert from mac to java. * - * @return + * @return the converted time */ public static long getDate(long time, boolean encode) { - time = (encode) ? time + MAC_DATE_CONVERTION : time - MAC_DATE_CONVERTION; + time = (encode) ? time + MAC_DATE_CONVERSION : time - MAC_DATE_CONVERSION; return time; } /** * - * @param time - * @param dateFormat - * @return + * @param time a date/time in seconds since the UNIX epoch. + * @param dateFormat the date/time format string + * @return the date/time formatted as a String */ public static String printDate(final long time, final String dateFormat) { Calendar cal = Calendar.getInstance(); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -200,9 +200,7 @@ * Calculate the number of blocks needed for bitmap. * * @param totalBlocks Total of blocks found in the device. - * - * @return long - Number of blocks. - * + * @return the number of blocks. * @throws IOException */ private long getClumpSize(long totalBlocks) throws IOException { @@ -418,7 +416,7 @@ /** * Get string representation of attribute. * - * @return + * @return the string representation */ public final String getAttributesAsString() { return ((isAttribute(HFSPLUS_VOL_UNMNT_BIT)) ? " kHFSVolumeUnmountedBit" : "") + @@ -431,7 +429,7 @@ * * @param maskBit Bit position of the attribute. See constants. * - * @return true if attribute is set. + * @return {@code true} if attribute is set. */ public final boolean isAttribute(final int maskBit) { return (((getAttributes() >> maskBit) & 0x1) != 0); @@ -441,11 +439,6 @@ return data; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ public final String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("Magic: 0x").append(NumberUtils.hex(getMagic(), 4)).append("\n"); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -41,17 +41,19 @@ private final Logger log = Logger.getLogger(getClass()); private HfsPlusFileSystem fs; + /** * B-Tree node descriptor */ private NodeDescriptor btnd; + /** * B-Tree Header record */ private BTHeaderRecord bthr; - /** */ + private int catalogHeaderNodeOffset; - /** */ + private ByteBuffer buffer; /** @@ -143,7 +145,7 @@ /** * @param parentID - * @return + * @return the leaf record, or possibly {code null}. * @throws IOException */ public final LeafRecord getRecord(final CatalogNodeId parentID) throws IOException { @@ -186,7 +188,7 @@ /** * Find leaf records corresponding to parentID. The search begin at the node - * correspding to the index passed as parameter. + * corresponding to the index passed as parameter. * * @param parentID Parent node id * @param nodeNumber Index of node where the search begin. @@ -202,7 +204,7 @@ fs.getApi().read(catalogHeaderNodeOffset + (currentNodeNumber * nodeSize), nodeData); CatalogNode node = new CatalogNode(nodeData.array(), nodeSize); if (node.isIndexNode()) { - IndexRecord[] records = (IndexRecord[]) node.findChilds(parentID); + IndexRecord[] records = (IndexRecord[]) node.findChildren(parentID); List<LeafRecord> lfList = new LinkedList<LeafRecord>(); for (IndexRecord rec : records) { LeafRecord[] lfr = getRecords(parentID, rec.getIndex()); @@ -226,7 +228,7 @@ /** * @param parentID * @param nodeName - * @return + * @return the leaf node or {@code null} * @throws IOException */ public final LeafRecord getRecord(final CatalogNodeId parentID, final HFSUnicodeString nodeName) Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFile.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogFile.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -90,9 +90,6 @@ * * @param flags * @param fileId - * @param createDate - * @param contentModDate - * @param attrModDate * @param datas * @param resources */ @@ -109,17 +106,12 @@ /** * - * @return + * @return a serious case of nothing much at all */ public byte[] getBytes() { return null; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ public final String toString() { StringBuffer s = new StringBuffer(); s.append("Record type:").append(recordType).append("\t"); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -60,7 +60,7 @@ /** * @param parentId - * @return + * @return a NodeRecord or {@code null} */ public final NodeRecord find(final CatalogNodeId parentId) { for (int index = 0; index < this.getNodeDescriptor().getNumRecords(); index++) { @@ -77,7 +77,7 @@ /** * @param key - * @return + * @return a NodeRecord or {@code null} */ public NodeRecord find(final CatalogKey key) { NodeRecord largestMatchingRecord = null; @@ -93,9 +93,9 @@ /** * @param parentId - * @return + * @return an array of NodeRecords */ - public final NodeRecord[] findChilds(final CatalogNodeId parentId) { + public final NodeRecord[] findChildren(final CatalogNodeId parentId) { LinkedList<NodeRecord> result = new LinkedList<NodeRecord>(); NodeRecord largestMatchingRecord = null; CatalogKey largestMatchingKey = null; @@ -119,7 +119,7 @@ /** * @param parentId - * @return + * @return an array of NodeRecords */ public final NodeRecord[] findAll(final CatalogNodeId parentId) { List<NodeRecord> list = new LinkedList<NodeRecord>(); Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogThread.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogThread.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogThread.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -26,13 +26,16 @@ public class CatalogThread { public static final int CATALOG_THREAD_SIZE = 512; + /** The catalog thread record type. Can be a file or a folder. */ private int recordType; + /** * the catalog node id of the file or folder referenced by the thread * record. */ private CatalogNodeId parentId; + /** the name of the file or folder reference by the thread record. */ private HFSUnicodeString nodeName; @@ -66,7 +69,7 @@ /** * - * @return + * @return the thread encoded as data */ public byte[] getBytes() { byte[] data = new byte[512]; Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/ExtentDescriptor.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -25,8 +25,10 @@ public class ExtentDescriptor { /** The size of the extent descriptor. */ public static final int EXTENT_DESCRIPTOR_LENGTH = 8; + /** The first allocation block. */ private int startBlock; + /** The length in allocation blocks of the extent. */ private int blockCount; @@ -60,8 +62,7 @@ } /** - * - * @return + * @return the extent encoded as data */ public final byte[] getBytes() { byte[] data = new byte[EXTENT_DESCRIPTOR_LENGTH]; Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/IndexNode.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/IndexNode.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/IndexNode.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -24,7 +24,6 @@ /** * - * @param descriptor * @param nodeData * @param nodeSize */ Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafNode.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafNode.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafNode.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -25,7 +25,6 @@ /** * - * @param descriptor * @param nodeData * @param nodeSize */ Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/NodeDescriptor.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/NodeDescriptor.java 2009-03-26 09:28:30 UTC (rev 5155) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/NodeDescriptor.java 2009-03-26 11:50:49 UTC (rev 5156) @@ -27,16 +27,22 @@ public static final int BT_INDEX_NODE = 0; public static final int BT_HEADER_NODE = 1; public static final int BT_MAP_NODE = 2; + /** The size of the node descriptor. */ public static final int BT_NODE_DESCRIPTOR_LENGTH = 14; + /** The number of the next node. */ private int fLink; + /** The number of the previous node. */ private int bLink; + /** The type of the node. */ private int kind; + /** The depth of this node in the B-Tree. */ private int height; + /** The number of records in this node. */ private int numRecords; @@ -75,7 +81,7 @@ /** * - * @return + * @return the descriptor rendered as bytes */ public byte[] getBytes() { byte[] data = new byte[BT_NODE_DESCRIPTOR_LENGTH]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |