|
From: <ls...@us...> - 2009-02-01 23:22:02
|
Revision: 4967
http://jnode.svn.sourceforge.net/jnode/?rev=4967&view=rev
Author: lsantha
Date: 2009-02-01 22:13:30 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Fixed code style.
Modified Paths:
--------------
trunk/core/src/core/org/jnode/util/BigEndian.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java
Modified: trunk/core/src/core/org/jnode/util/BigEndian.java
===================================================================
--- trunk/core/src/core/org/jnode/util/BigEndian.java 2009-02-01 22:03:50 UTC (rev 4966)
+++ trunk/core/src/core/org/jnode/util/BigEndian.java 2009-02-01 22:13:30 UTC (rev 4967)
@@ -18,7 +18,7 @@
* 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.util;
@@ -248,16 +248,16 @@
final int v0 = data[offset + 1] & 0xFF;
return (char) ((v1 << 8) | v0);
}
-
+
/**
* Set char as byte in the given byte array at the given offset.
- *
+ *
* @param dst
* @param offset
* @param value
*/
public static void setChar(byte[] dst, int offset, char value) {
- dst[offset + 1] = (byte)(value & 0xFF);
- dst[offset + 0] = (byte)((value >>> 8) & 0xFF);
+ dst[offset + 1] = (byte) (value & 0xFF);
+ dst[offset + 0] = (byte) ((value >>> 8) & 0xFF);
}
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-02-01 22:03:50 UTC (rev 4966)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-02-01 22:13:30 UTC (rev 4967)
@@ -18,7 +18,7 @@
* 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.hfsplus;
import java.io.IOException;
@@ -30,7 +30,6 @@
import org.apache.log4j.Logger;
import org.jnode.fs.FSEntry;
import org.jnode.fs.ReadOnlyFileSystemException;
-import org.jnode.fs.hfsplus.catalog.Catalog;
import org.jnode.fs.hfsplus.catalog.CatalogFolder;
import org.jnode.fs.hfsplus.catalog.CatalogKey;
import org.jnode.fs.hfsplus.catalog.CatalogNodeId;
@@ -63,21 +62,21 @@
throw new ReadOnlyFileSystemException();
}
Superblock volumeHeader = ((HfsPlusFileSystem) getFileSystem())
- .getVolumeHeader();
+ .getVolumeHeader();
Calendar now = Calendar.getInstance();
now.setTime(new Date());
int macDate = (int) HFSUtils
- .getDate(now.getTimeInMillis() / 1000, true);
+ .getDate(now.getTimeInMillis() / 1000, true);
HFSUnicodeString dirName = new HFSUnicodeString(name);
CatalogThread thread = new CatalogThread(
- HfsPlusConstants.RECORD_TYPE_FOLDER_THREAD, this.folder
- .getFolderId(), dirName);
+ HfsPlusConstants.RECORD_TYPE_FOLDER_THREAD, this.folder
+ .getFolderId(), dirName);
CatalogFolder newFolder = new CatalogFolder();
newFolder
- .setFolderId(new CatalogNodeId(volumeHeader.getNextCatalogId()));
+ .setFolderId(new CatalogNodeId(volumeHeader.getNextCatalogId()));
newFolder.setCreateDate(macDate);
newFolder.setContentModDate(macDate);
newFolder.setAttrModDate(macDate);
@@ -90,8 +89,8 @@
log.debug("New record folder :\n" + folderRecord.toString());
HFSPlusEntry newEntry = new HFSPlusEntry(
- (HfsPlusFileSystem) getFileSystem(), null, this, name,
- folderRecord);
+ (HfsPlusFileSystem) getFileSystem(), null, this, name,
+ folderRecord);
volumeHeader.setFolderCount(volumeHeader.getFolderCount() + 1);
log.debug("New volume header :\n" + volumeHeader.toString());
@@ -113,21 +112,21 @@
@Override
protected final FSEntryTable readEntries() throws IOException {
List<FSEntry> pathList = new LinkedList<FSEntry>();
- HfsPlusFileSystem fs = (HfsPlusFileSystem)getFileSystem();
- if(fs.getVolumeHeader().getFolderCount() > 0) {
- LeafRecord[] records = fs.getCatalog().getRecords(folder.getFolderId());
- for (LeafRecord rec : records) {
- if (rec.getType() == HfsPlusConstants.RECORD_TYPE_FOLDER
- || rec.getType() == HfsPlusConstants.RECORD_TYPE_FILE) {
- String name = ((CatalogKey) rec.getKey()).getNodeName()
+ HfsPlusFileSystem fs = (HfsPlusFileSystem) getFileSystem();
+ if (fs.getVolumeHeader().getFolderCount() > 0) {
+ LeafRecord[] records = fs.getCatalog().getRecords(folder.getFolderId());
+ for (LeafRecord rec : records) {
+ if (rec.getType() == HfsPlusConstants.RECORD_TYPE_FOLDER
+ || rec.getType() == HfsPlusConstants.RECORD_TYPE_FILE) {
+ String name = ((CatalogKey) rec.getKey()).getNodeName()
.getUnicodeString();
- HFSPlusEntry e = new HFSPlusEntry(
- (HfsPlusFileSystem) getFileSystem(), null, this, name,
- rec);
- pathList.add(e);
- }
+ HFSPlusEntry e = new HFSPlusEntry(
+ (HfsPlusFileSystem) getFileSystem(), null, this, name,
+ rec);
+ pathList.add(e);
}
}
+ }
return new FSEntryTable(((HfsPlusFileSystem) getFileSystem()), pathList);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|