Minor corrections plus added @param and @return where missing
Index: ZipLong.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/zip/ZipLong.java,v
retrieving revision 1.11
diff -u -r1.11 ZipLong.java
--- ZipLong.java 4 Dec 2004 00:03:50 -0000 1.11
+++ ZipLong.java 6 Dec 2004 05:11:02 -0000
@@ -29,6 +29,7 @@
/**
* Create instance from a number.
+ * @param value the long to store as a ZipLong
* @since 1.1
*/
public ZipLong(long value) {
@@ -37,6 +38,7 @@
/**
* Create instance from bytes.
+ * @param bytes the bytes to store as a ZipLong
* @since 1.1
*/
public ZipLong (byte[] bytes) {
@@ -45,6 +47,8 @@
/**
* Create instance from the four bytes starting at offset.
+ * @param bytes the bytes to store as a ZipLong
+ * @param offset the offset to start
* @since 1.1
*/
public ZipLong (byte[] bytes, int offset) {
@@ -54,14 +58,16 @@
/**
* Get value as four bytes in big endian byte order.
* @since 1.1
+ * @return value as four bytes in big endian order
*/
public byte[] getBytes() {
return ZipLong.getBytes(value);
}
/**
- * Get value as Java int.
+ * Get value as Java long.
* @since 1.1
+ * @return value as a long
*/
public long getValue() {
return value;
@@ -82,10 +88,10 @@
}
/**
- * Helper method to get the value as a java long from four bytes starting
at given array offset
+ * Helper method to get the value as a Java long from four bytes starting
at given array offset
* @param bytes the array of bytes
* @param offset the offset to start
- * @return the correspondanding java int value
+ * @return the correspondanding Java long value
*/
public static long getValue(byte[] bytes, int offset){
long value = (bytes[offset + 3] << 24) & 0xFF000000L;
@@ -96,9 +102,9 @@
}
/**
- * Helper method to get the value as a java long from a four-byte array
+ * Helper method to get the value as a Java long from a four-byte array
* @param bytes the array of bytes
- * @return the correspondanding java long value
+ * @return the correspondanding Java long value
*/
public static long getValue(byte[] bytes){
return getValue(bytes, 0);
@@ -106,7 +112,7 @@
/**
* Override to make two instances with same value equal.
- *
+ * @param o an object to compare
* @since 1.1
*/
public boolean equals(Object o) {
@@ -118,7 +124,7 @@
/**
* Override to make two instances with same value equal.
- *
+ * @return the value stored in the ZipLong
* @since 1.1
*/
public int hashCode() {
Index: ZipShort.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/zip/ZipShort.java,v
retrieving revision 1.11
diff -u -r1.11 ZipShort.java
--- ZipShort.java 4 Dec 2004 00:03:50 -0000 1.11
+++ ZipShort.java 6 Dec 2004 05:11:02 -0000
@@ -29,7 +29,7 @@
/**
* Create instance from a number.
- *
+ * @param value the int to store as a ZipShort
* @since 1.1
*/
public ZipShort (int value) {
@@ -38,6 +38,7 @@
/**
* Create instance from bytes.
+ * @param bytes the bytes to store as a ZipShort
* @since 1.1
*/
public ZipShort (byte[] bytes) {
@@ -46,6 +47,8 @@
/**
* Create instance from the two bytes starting at offset.
+ * @param bytes the bytes to store as a ZipShort
+ * @param offset the offset to start
* @since 1.1
*/
public ZipShort (byte[] bytes, int offset) {
@@ -54,6 +57,7 @@
/**
* Get value as two bytes in big endian byte order.
+ * @return the value as a a two byte array in big endian byte order
* @since 1.1
*/
public byte[] getBytes() {
@@ -65,6 +69,7 @@
/**
* Get value as Java int.
+ * @return value as a Java int
* @since 1.1
*/
public int getValue() {
@@ -73,6 +78,8 @@
/**
* Get value as two bytes in big endian byte order.
+ * @param value the Java int to convert to bytes
+ * @return the converted int as a byte array in big endian byte order
*/
public static byte[] getBytes(int value){
byte[] result = new byte[2];
@@ -104,7 +111,7 @@
/**
* Override to make two instances with same value equal.
- *
+ * @param o an object to compare
* @since 1.1
*/
public boolean equals(Object o) {
@@ -116,7 +123,7 @@
/**
* Override to make two instances with same value equal.
- *
+ * @return the value stored in the ZipShort
* @since 1.1
*/
public int hashCode() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]