|
From: <ls...@us...> - 2008-06-15 17:12:51
|
Revision: 4251
http://jnode.svn.sourceforge.net/jnode/?rev=4251&view=rev
Author: lsantha
Date: 2008-06-15 10:12:49 -0700 (Sun, 15 Jun 2008)
Log Message:
-----------
Codestyle fixes.
Modified Paths:
--------------
trunk/fs/src/fs/org/jnode/fs/command/DFCommand.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660DTime.java
trunk/fs/src/fs/org/jnode/fs/smbfs/SMBFileSystem.java
Modified: trunk/fs/src/fs/org/jnode/fs/command/DFCommand.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/command/DFCommand.java 2008-06-15 17:09:21 UTC (rev 4250)
+++ trunk/fs/src/fs/org/jnode/fs/command/DFCommand.java 2008-06-15 17:12:49 UTC (rev 4251)
@@ -23,12 +23,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
-import java.io.StringWriter;
import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.Map;
-
import javax.naming.NameNotFoundException;
-
import org.jnode.driver.Device;
import org.jnode.driver.DeviceManager;
import org.jnode.fs.FileSystem;
@@ -41,25 +39,24 @@
/**
* The DF command prints disk usage information for devices with filesystems.
- *
+ *
* @author ga...@jn...
* @author cr...@jn...
* @author Levente S\u00e1ntha
- *
*/
public class DFCommand extends AbstractCommand {
-
+
private final DeviceArgument ARG_DEVICE = new DeviceArgument(
- "device", Argument.OPTIONAL,
- "The device for which disk usage inforrmation should be displayed");
+ "device", Argument.OPTIONAL,
+ "The device for which disk usage inforrmation should be displayed");
public DFCommand() {
super("Print file system usage information");
registerArguments(ARG_DEVICE);
}
-
+
public void execute(CommandLine commandLine, InputStream in,
- PrintStream out, PrintStream err) throws NameNotFoundException {
+ PrintStream out, PrintStream err) throws NameNotFoundException {
final FileSystemService fss = InitialNaming.lookup(FileSystemService.NAME);
final Map<String, String> mountPoints = fss.getDeviceMountPoints();
StringWriter sw = new StringWriter();
@@ -91,8 +88,8 @@
out.print(sw.toString());
}
+
/**
- *
* @param out
* @param dev
* @param fs
@@ -114,7 +111,7 @@
str = free < 0 ? "unknown" : String.valueOf(free);
format(out, str, false);
-
+
out.println(mountPoint);
} catch (IOException ex) {
out.println("\tError getting disk usage information for " + mountPoint + " on " + dev.getId() +
@@ -125,14 +122,14 @@
private void format(PrintWriter out, String str, boolean left) {
int ln;
ln = 15 - str.length();
- if(ln < 0) str = str.substring(0, 15);
+ if (ln < 0) str = str.substring(0, 15);
else {
- if(left){
+ if (left) {
out.print(str);
}
- for(int i = 0; i < ln; i++) out.print(' ');
+ for (int i = 0; i < ln; i++) out.print(' ');
}
- if(!left)
+ if (!left)
out.print(str);
out.print(' ');
}
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660DTime.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660DTime.java 2008-06-15 17:09:21 UTC (rev 4250)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660DTime.java 2008-06-15 17:12:49 UTC (rev 4251)
@@ -1,9 +1,9 @@
package org.jnode.fs.iso9660;
-import org.jnode.util.LittleEndian;
import java.util.Calendar;
+import java.util.GregorianCalendar;
import java.util.TimeZone;
-import java.util.GregorianCalendar;
+import org.jnode.util.LittleEndian;
/**
* ISO9660 datetime structure.
@@ -12,38 +12,53 @@
*/
public class ISO9660DTime {
- /** Length of the structure. */
+ /**
+ * Length of the structure.
+ */
static final int LENGTH = 7;
- /** Number of years since 1900. */
+ /**
+ * Number of years since 1900.
+ */
private final int/*uint8*/ year;
- /** Month of the year from 1 to 12. */
+ /**
+ * Month of the year from 1 to 12.
+ */
private final int/*uint8*/ month;
- /** Day of the month from 1 to 31. */
+ /**
+ * Day of the month from 1 to 31.
+ */
private final int/*uint8*/ day;
- /** Hour of the day from 0 to 23. */
+ /**
+ * Hour of the day from 0 to 23.
+ */
private final int/*uint8*/ hour;
- /** Minute of the hour from 0 to 59. */
+ /**
+ * Minute of the hour from 0 to 59.
+ */
private final int/*uint8*/ minute;
- /** Second of the minute from 0 to 59. */
+ /**
+ * Second of the minute from 0 to 59.
+ */
private final int/*uint8*/ second;
- /** GMT values -48 .. + 52 in 15 minute intervals (e.g. -48 = GMT-12, +48=GMT+12, 0=UTC.) */
+ /**
+ * GMT values -48 .. + 52 in 15 minute intervals (e.g. -48 = GMT-12, +48=GMT+12, 0=UTC.)
+ */
private final int/*int8*/ gmtOffset;
/**
* Constructs an ISO9660 datetime structure by reading from the provided byte array.
*
* @param buff the byte array from which to read.
- * @param off offset into the byte array at which to read the struct.
+ * @param off offset into the byte array at which to read the struct.
*/
- public ISO9660DTime(byte[] buff, int off)
- {
+ public ISO9660DTime(byte[] buff, int off) {
year = LittleEndian.getUInt8(buff, off);
month = LittleEndian.getUInt8(buff, off + 1);
day = LittleEndian.getUInt8(buff, off + 2);
@@ -58,8 +73,7 @@
*
* @return the date as millis since 1970.
*/
- public long toJavaMillis()
- {
+ public long toJavaMillis() {
// Force use of the Gregorian calendar in UTC and manually offset hours later.
// Mainly because it isn't convenient to create a TimeZone from a UTC/GMT offset.
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
Modified: trunk/fs/src/fs/org/jnode/fs/smbfs/SMBFileSystem.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/smbfs/SMBFileSystem.java 2008-06-15 17:09:21 UTC (rev 4250)
+++ trunk/fs/src/fs/org/jnode/fs/smbfs/SMBFileSystem.java 2008-06-15 17:12:49 UTC (rev 4251)
@@ -24,7 +24,6 @@
import java.io.IOException;
import jcifs.smb.NtlmAuthenticator;
import jcifs.smb.NtlmPasswordAuthentication;
-import jcifs.smb.SmbException;
import jcifs.smb.SmbFile;
import org.jnode.fs.FileSystem;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|