[FOray-commit] SF.net SVN: foray: [8055] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-11 18:38:50
|
Revision: 8055
http://svn.sourceforge.net/foray/?rev=8055&view=rev
Author: victormote
Date: 2006-09-11 11:38:39 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Fix method return values.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-common/src/java/org/foray/common/WKConstants.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -92,7 +92,7 @@
* @param byte4 The low-order byte.
* @return The int represented by the four bytes.
*/
- public static int bytesToLong(final byte byte1, final byte byte2,
+ public static long bytesToLong(final byte byte1, final byte byte2,
final byte byte3, final byte byte4) {
final int int1 = unsignedByteToInt(byte1);
final int int2 = unsignedByteToInt(byte2);
@@ -118,7 +118,7 @@
* at start + 3.
* @return The int represented by the four bytes.
*/
- public static int bytesToLongBE(final byte[] byteArray, final int start) {
+ public static long bytesToLongBE(final byte[] byteArray, final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
@@ -141,7 +141,7 @@
* (the high-order byte) at start + 3.
* @return The int represented by the four bytes.
*/
- public static int bytesToLongLE(final byte[] byteArray, final int start) {
+ public static long bytesToLongLE(final byte[] byteArray, final int start) {
if (byteArray == null
|| start < 0
|| start + BYTES_PER_INT > byteArray.length) {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -70,7 +70,7 @@
if (palette != null) {
filepos += palette.length * this.colorSpace.getNumComponents();
}
- final int imagestart = WKConstants.bytesToLongLE(headermap,
+ final int imagestart = (int) WKConstants.bytesToLongLE(headermap,
IMAGE_START_OFFSET);
this.colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
final int bytesPerRow = computeBytesPerRow();
@@ -240,8 +240,9 @@
final byte[] header = new byte[BMPGraphic.BMP_BASICS_LENGTH];
bis.read(header);
/* Little endian format. */
- this.pixelWidth = WKConstants.bytesToLongLE(header, WIDTH_OFFSET);
- this.pixelHeight = WKConstants.bytesToLongLE(header, HEIGHT_OFFSET);
+ this.pixelWidth = (int) WKConstants.bytesToLongLE(header, WIDTH_OFFSET);
+ this.pixelHeight = (int) WKConstants.bytesToLongLE(header,
+ HEIGHT_OFFSET);
}
public String getName() {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -152,17 +152,17 @@
final byte[] fileStart = new byte[this.maxBytesToParseBasics()];
bis.read(fileStart);
if (! isAscii) {
- this.psStart = WKConstants.bytesToLongBE(fileStart,
+ this.psStart = (int) WKConstants.bytesToLongBE(fileStart,
PS_START_OFFSET);
- this.psLength = WKConstants.bytesToLongBE(fileStart,
+ this.psLength = (int) WKConstants.bytesToLongBE(fileStart,
PS_LENGTH_OFFSET);
- this.wmfStart = WKConstants.bytesToLongBE(fileStart,
+ this.wmfStart = (int) WKConstants.bytesToLongBE(fileStart,
WMF_START_OFFSET);
- this.wmfLength = WKConstants.bytesToLongBE(fileStart,
+ this.wmfLength = (int) WKConstants.bytesToLongBE(fileStart,
WMF_LENGTH_OFFSET);
- this.tiffStart = WKConstants.bytesToLongBE(fileStart,
+ this.tiffStart = (int) WKConstants.bytesToLongBE(fileStart,
TIFF_START_OFFSET);
- this.tiffLength = WKConstants.bytesToLongBE(fileStart,
+ this.tiffLength = (int) WKConstants.bytesToLongBE(fileStart,
TIFF_LENGTH_OFFSET);
}
readBBox(fileStart);
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:29:15 UTC (rev 8054)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/PNGGraphic.java 2006-09-11 18:38:39 UTC (rev 8055)
@@ -66,8 +66,9 @@
final byte[] header = new byte[PNGGraphic.PNG_BASICS_LENGTH];
bis.read(header);
/* PNG is always big endian. */
- this.pixelWidth = WKConstants.bytesToLongBE(header, PIXEL_WIDTH_STARTS);
- this.pixelHeight = WKConstants.bytesToLongBE(header,
+ this.pixelWidth = (int) WKConstants.bytesToLongBE(header,
+ PIXEL_WIDTH_STARTS);
+ this.pixelHeight = (int) WKConstants.bytesToLongBE(header,
PIXEL_HEIGHT_STARTS);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|