From: Peter Bernard West Date: Mon, 5 Jan 2004 01:49:50 +0000 (+0000) Subject: Added copyarray method. X-Git-Tag: Alt-Design_pre_awt_renderer_import~199 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5133d830a1d2af11afd639893a74b4bcb9191307;p=xmlgraphics-fop.git Added copyarray method. Added javadoc comment on class. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197117 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/datastructs/ROIntArray.java b/src/java/org/apache/fop/datastructs/ROIntArray.java index c71596e1f..392a38ed3 100644 --- a/src/java/org/apache/fop/datastructs/ROIntArray.java +++ b/src/java/org/apache/fop/datastructs/ROIntArray.java @@ -1,7 +1,4 @@ -/** - * Provides a Read-Only int array. - * - * +/* * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ @@ -56,6 +53,11 @@ // $Id$ package org.apache.fop.datastructs; +/** + * Provides a Read-Only int array. + * + * @author pbw + */ public class ROIntArray { private int[] iarray; @@ -104,4 +106,13 @@ public class ROIntArray { public int get(int index) { return iarray[index]; } + + /** + * @return a copy of the array + */ + public int[] copyarray() { + int[] tmp = null; + System.arraycopy(iarray, 0, tmp, 0, iarray.length); + return tmp; + } }