aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2002-12-31 19:11:22 +0000
committerjhugunin <jhugunin>2002-12-31 19:11:22 +0000
commitad84a3bad254c8f8eaebb41c236ecf8fc3e71aae (patch)
treec6c8b66cfeb2d104a3ddc11bf976993aba10a5c0 /util
parent38e7ac92dc5fb4e6c7a77b8b4f3b3a5391e44aeb (diff)
downloadaspectj-ad84a3bad254c8f8eaebb41c236ecf8fc3e71aae.tar.gz
aspectj-ad84a3bad254c8f8eaebb41c236ecf8fc3e71aae.zip
boolean array read/write
Diffstat (limited to 'util')
-rw-r--r--util/src/org/aspectj/util/FileUtil.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java
index b9a91b001..0d4d76989 100644
--- a/util/src/org/aspectj/util/FileUtil.java
+++ b/util/src/org/aspectj/util/FileUtil.java
@@ -814,6 +814,27 @@ public class FileUtil {
/**
+ * Reads a boolean array with our encoding
+ */
+ public static boolean[] readBooleanArray(DataInputStream s) throws IOException {
+ int len = s.readInt();
+ boolean[] ret = new boolean[len];
+ for (int i=0; i < len; i++) ret[i] = s.readBoolean();
+ return ret;
+ }
+
+
+ /**
+ * Writes a boolean array with our encoding
+ */
+ public static void writeBooleanArray(boolean[] a, DataOutputStream s) throws IOException {
+ int len = a.length;
+ s.writeInt(len);
+ for (int i=0; i < len; i++) s.writeBoolean(a[i]);
+ }
+
+
+ /**
* Reads an int array with our encoding
*/
public static int[] readIntArray(DataInputStream s) throws IOException {
@@ -827,7 +848,7 @@ public class FileUtil {
/**
* Writes an int array with our encoding
*/
- public static void writeIntArray(DataOutputStream s, int[] a) throws IOException {
+ public static void writeIntArray(int[] a, DataOutputStream s) throws IOException {
int len = a.length;
s.writeInt(len);
for (int i=0; i < len; i++) s.writeInt(a[i]);
@@ -849,7 +870,7 @@ public class FileUtil {
/**
* Writes an int array with our encoding
*/
- public static void writeStringArray(DataOutputStream s, String[] a) throws IOException {
+ public static void writeStringArray(String[] a, DataOutputStream s) throws IOException {
if (a == null) {
s.writeInt(0);
return;