From 00de9a8fc1a67e93c512ba67451d1e8815d57b39 Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Fri, 24 Oct 2008 13:25:03 +0000 Subject: Merged revisions 707627 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r707627 | acumiskey | 2008-10-24 14:20:51 +0100 (Fri, 24 Oct 2008) | 3 lines AFPFontReader a lot more robust now with less copy/pasted code but still far from ideal, the whole AFP FOCA parsing/handling still in need of a rewrite at some point. CharacterSetOrientation width() renamed to getWidth() and now protects itself against a possible ArrayIndexOutOfBoundsException. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@707629 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/render/afp/tools/StructuredFieldReader.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/java/org/apache/fop/render/afp/tools') diff --git a/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java b/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java index 1939d2dda..48beff023 100644 --- a/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java +++ b/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java @@ -58,14 +58,14 @@ public class StructuredFieldReader { * parameter (this must be a valid MO:DCA structured field. * @param identifier the three byte identifier * @throws IOException if an I/O exception occurred - * @return the next structured field + * @return the next structured field or null when there are no more */ public byte[] getNext(byte[] identifier) throws IOException { int bufferPointer = 0; byte[] bufferData = new byte[identifier.length + 2]; for (int x = 0; x < identifier.length; x++) { - bufferData[x] = (byte) 0; + bufferData[x] = 0x00; } int c; @@ -128,7 +128,6 @@ public class StructuredFieldReader { } - return new byte[] { - }; + return null; } } -- cgit v1.2.3