You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/07/06 12:51:21 UTC
svn commit: r1358111 [5/13] - in
/incubator/isis/trunk/framework/core/commons: ./
src/main/java/org/apache/isis/core/commons/authentication/
src/main/java/org/apache/isis/core/commons/components/
src/main/java/org/apache/isis/core/commons/config/ src/m...
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputStreamExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputStreamExtended.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputStreamExtended.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataInputStreamExtended.java Fri Jul 6 10:51:16 2012
@@ -1,206 +1,206 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-public class DataInputStreamExtended implements DataInputExtended {
-
- private final DataInputStream dataInputStream;
-
- public DataInputStreamExtended(final InputStream inputStream) {
- this.dataInputStream = new DataInputStream(inputStream);
- }
-
- @Override
- public DataInputStream getDataInputStream() {
- return dataInputStream;
- }
-
- // ////////////////////////////////////////
- // Boolean, Char
- // ////////////////////////////////////////
-
- @Override
- public boolean readBoolean() throws IOException {
- return FieldType.BOOLEAN.read(this);
- }
-
- @Override
- public boolean[] readBooleans() throws IOException {
- return FieldType.BOOLEAN_ARRAY.read(this);
- }
-
- @Override
- public char readChar() throws IOException {
- return FieldType.CHAR.read(this);
- }
-
- @Override
- public char[] readChars() throws IOException {
- return FieldType.CHAR_ARRAY.read(this);
- }
-
- // ////////////////////////////////////////
- // Integral Numbers
- // ////////////////////////////////////////
-
- @Override
- public byte readByte() throws IOException {
- return FieldType.BYTE.read(this);
- }
-
- @Override
- public byte[] readBytes() throws IOException {
- return FieldType.BYTE_ARRAY.read(this);
- }
-
- @Override
- public short readShort() throws IOException {
- return FieldType.SHORT.read(this);
- }
-
- @Override
- public short[] readShorts() throws IOException {
- return FieldType.SHORT_ARRAY.read(this);
- }
-
- @Override
- public int readInt() throws IOException {
- return FieldType.INTEGER.read(this);
- }
-
- @Override
- public int readUnsignedByte() throws IOException {
- return FieldType.UNSIGNED_BYTE.read(this);
- }
-
- @Override
- public int readUnsignedShort() throws IOException {
- return FieldType.UNSIGNED_SHORT.read(this);
- }
-
- @Override
- public int[] readInts() throws IOException {
- return FieldType.INTEGER_ARRAY.read(this);
- }
-
- @Override
- public long readLong() throws IOException {
- return FieldType.LONG.read(this);
- }
-
- @Override
- public long[] readLongs() throws IOException {
- return FieldType.LONG_ARRAY.read(this);
- }
-
- // ////////////////////////////////////////
- // Floating Point Numbers
- // ////////////////////////////////////////
-
- @Override
- public float readFloat() throws IOException {
- return FieldType.FLOAT.read(this);
- }
-
- @Override
- public float[] readFloats() throws IOException {
- return FieldType.FLOAT_ARRAY.read(this);
- }
-
- @Override
- public double readDouble() throws IOException {
- return FieldType.DOUBLE.read(this);
- }
-
- @Override
- public double[] readDoubles() throws IOException {
- return FieldType.DOUBLE_ARRAY.read(this);
- }
-
- // ////////////////////////////////////////
- // Strings
- // ////////////////////////////////////////
-
- @Override
- public String readUTF() throws IOException {
- return FieldType.STRING.read(this);
- }
-
- @Override
- public String[] readUTFs() throws IOException {
- return FieldType.STRING_ARRAY.read(this);
- }
-
- // ////////////////////////////////////////
- // Encodable and Serializable
- // ////////////////////////////////////////
-
- @Override
- @SuppressWarnings("unchecked")
- public <T> T readEncodable(final Class<T> encodableType) throws IOException {
- return (T) FieldType.ENCODABLE.read(this);
- }
-
- @Override
- public <T> T[] readEncodables(final Class<T> elementType) throws IOException {
- return FieldType.ENCODABLE_ARRAY.readArray(this, elementType);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public <T> T readSerializable(final Class<T> serializableType) throws IOException {
- return (T) FieldType.SERIALIZABLE.read(this);
- }
-
- @Override
- public <T> T[] readSerializables(final Class<T> elementType) throws IOException {
- return FieldType.SERIALIZABLE_ARRAY.readArray(this, elementType);
- }
-
- // ////////////////////////////////////////
- // Other
- // ////////////////////////////////////////
-
- @Override
- public void readFully(final byte[] b) throws IOException {
- dataInputStream.readFully(b);
- }
-
- @Override
- public void readFully(final byte[] b, final int off, final int len) throws IOException {
- dataInputStream.readFully(b, off, len);
- }
-
- @Override
- @SuppressWarnings("deprecation")
- public String readLine() throws IOException {
- return dataInputStream.readLine();
- }
-
- @Override
- public int skipBytes(final int n) throws IOException {
- return dataInputStream.skipBytes(n);
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class DataInputStreamExtended implements DataInputExtended {
+
+ private final DataInputStream dataInputStream;
+
+ public DataInputStreamExtended(final InputStream inputStream) {
+ this.dataInputStream = new DataInputStream(inputStream);
+ }
+
+ @Override
+ public DataInputStream getDataInputStream() {
+ return dataInputStream;
+ }
+
+ // ////////////////////////////////////////
+ // Boolean, Char
+ // ////////////////////////////////////////
+
+ @Override
+ public boolean readBoolean() throws IOException {
+ return FieldType.BOOLEAN.read(this);
+ }
+
+ @Override
+ public boolean[] readBooleans() throws IOException {
+ return FieldType.BOOLEAN_ARRAY.read(this);
+ }
+
+ @Override
+ public char readChar() throws IOException {
+ return FieldType.CHAR.read(this);
+ }
+
+ @Override
+ public char[] readChars() throws IOException {
+ return FieldType.CHAR_ARRAY.read(this);
+ }
+
+ // ////////////////////////////////////////
+ // Integral Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public byte readByte() throws IOException {
+ return FieldType.BYTE.read(this);
+ }
+
+ @Override
+ public byte[] readBytes() throws IOException {
+ return FieldType.BYTE_ARRAY.read(this);
+ }
+
+ @Override
+ public short readShort() throws IOException {
+ return FieldType.SHORT.read(this);
+ }
+
+ @Override
+ public short[] readShorts() throws IOException {
+ return FieldType.SHORT_ARRAY.read(this);
+ }
+
+ @Override
+ public int readInt() throws IOException {
+ return FieldType.INTEGER.read(this);
+ }
+
+ @Override
+ public int readUnsignedByte() throws IOException {
+ return FieldType.UNSIGNED_BYTE.read(this);
+ }
+
+ @Override
+ public int readUnsignedShort() throws IOException {
+ return FieldType.UNSIGNED_SHORT.read(this);
+ }
+
+ @Override
+ public int[] readInts() throws IOException {
+ return FieldType.INTEGER_ARRAY.read(this);
+ }
+
+ @Override
+ public long readLong() throws IOException {
+ return FieldType.LONG.read(this);
+ }
+
+ @Override
+ public long[] readLongs() throws IOException {
+ return FieldType.LONG_ARRAY.read(this);
+ }
+
+ // ////////////////////////////////////////
+ // Floating Point Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public float readFloat() throws IOException {
+ return FieldType.FLOAT.read(this);
+ }
+
+ @Override
+ public float[] readFloats() throws IOException {
+ return FieldType.FLOAT_ARRAY.read(this);
+ }
+
+ @Override
+ public double readDouble() throws IOException {
+ return FieldType.DOUBLE.read(this);
+ }
+
+ @Override
+ public double[] readDoubles() throws IOException {
+ return FieldType.DOUBLE_ARRAY.read(this);
+ }
+
+ // ////////////////////////////////////////
+ // Strings
+ // ////////////////////////////////////////
+
+ @Override
+ public String readUTF() throws IOException {
+ return FieldType.STRING.read(this);
+ }
+
+ @Override
+ public String[] readUTFs() throws IOException {
+ return FieldType.STRING_ARRAY.read(this);
+ }
+
+ // ////////////////////////////////////////
+ // Encodable and Serializable
+ // ////////////////////////////////////////
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> T readEncodable(final Class<T> encodableType) throws IOException {
+ return (T) FieldType.ENCODABLE.read(this);
+ }
+
+ @Override
+ public <T> T[] readEncodables(final Class<T> elementType) throws IOException {
+ return FieldType.ENCODABLE_ARRAY.readArray(this, elementType);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> T readSerializable(final Class<T> serializableType) throws IOException {
+ return (T) FieldType.SERIALIZABLE.read(this);
+ }
+
+ @Override
+ public <T> T[] readSerializables(final Class<T> elementType) throws IOException {
+ return FieldType.SERIALIZABLE_ARRAY.readArray(this, elementType);
+ }
+
+ // ////////////////////////////////////////
+ // Other
+ // ////////////////////////////////////////
+
+ @Override
+ public void readFully(final byte[] b) throws IOException {
+ dataInputStream.readFully(b);
+ }
+
+ @Override
+ public void readFully(final byte[] b, final int off, final int len) throws IOException {
+ dataInputStream.readFully(b, off, len);
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public String readLine() throws IOException {
+ return dataInputStream.readLine();
+ }
+
+ @Override
+ public int skipBytes(final int n) throws IOException {
+ return dataInputStream.skipBytes(n);
+ }
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtended.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtended.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtended.java Fri Jul 6 10:51:16 2012
@@ -1,68 +1,68 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.Flushable;
-import java.io.IOException;
-
-public interface DataOutputExtended extends DataOutput, Flushable {
-
- public void writeBooleans(boolean[] booleans) throws IOException;
-
- public void writeChars(char[] chars) throws IOException;
-
- /**
- * NB: only writes out <tt>byte</tt>.
- */
- @Override
- public void write(int b) throws IOException;
-
- /**
- * Same as {@link #write(int)}.
- */
- @Override
- public void writeByte(int v) throws IOException;
-
- public void writeBytes(byte[] bytes) throws IOException;
-
- public void writeShorts(short[] shorts) throws IOException;
-
- public void writeInts(int[] ints) throws IOException;
-
- public void writeLongs(long[] longs) throws IOException;
-
- public void writeDoubles(double[] doubles) throws IOException;
-
- public void writeFloats(float[] floats) throws IOException;
-
- public void writeUTFs(String[] strings) throws IOException;
-
- public void writeEncodable(Object encodable) throws IOException;
-
- public void writeEncodables(Object[] encodables) throws IOException;
-
- public void writeSerializable(Object serializable) throws IOException;
-
- public void writeSerializables(Object[] serializables) throws IOException;
-
- DataOutputStream getDataOutputStream();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.Flushable;
+import java.io.IOException;
+
+public interface DataOutputExtended extends DataOutput, Flushable {
+
+ public void writeBooleans(boolean[] booleans) throws IOException;
+
+ public void writeChars(char[] chars) throws IOException;
+
+ /**
+ * NB: only writes out <tt>byte</tt>.
+ */
+ @Override
+ public void write(int b) throws IOException;
+
+ /**
+ * Same as {@link #write(int)}.
+ */
+ @Override
+ public void writeByte(int v) throws IOException;
+
+ public void writeBytes(byte[] bytes) throws IOException;
+
+ public void writeShorts(short[] shorts) throws IOException;
+
+ public void writeInts(int[] ints) throws IOException;
+
+ public void writeLongs(long[] longs) throws IOException;
+
+ public void writeDoubles(double[] doubles) throws IOException;
+
+ public void writeFloats(float[] floats) throws IOException;
+
+ public void writeUTFs(String[] strings) throws IOException;
+
+ public void writeEncodable(Object encodable) throws IOException;
+
+ public void writeEncodables(Object[] encodables) throws IOException;
+
+ public void writeSerializable(Object serializable) throws IOException;
+
+ public void writeSerializables(Object[] serializables) throws IOException;
+
+ DataOutputStream getDataOutputStream();
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtendedDecorator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtendedDecorator.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtendedDecorator.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputExtendedDecorator.java Fri Jul 6 10:51:16 2012
@@ -1,206 +1,206 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-public class DataOutputExtendedDecorator implements DataOutputExtended {
-
- private final DataOutputExtended underlying;
-
- public DataOutputExtendedDecorator(final DataOutputExtended underlying) {
- this.underlying = underlying;
- }
-
- @Override
- public DataOutputStream getDataOutputStream() {
- return underlying.getDataOutputStream();
- }
-
- // ////////////////////////////////////////
- // Boolean, Char
- // ////////////////////////////////////////
-
- @Override
- public void writeBoolean(final boolean v) throws IOException {
- underlying.writeBoolean(v);
- }
-
- @Override
- public void writeBooleans(final boolean[] booleans) throws IOException {
- underlying.writeBooleans(booleans);
- }
-
- @Override
- public void writeChar(final int v) throws IOException {
- underlying.writeChar(v);
- }
-
- @Override
- public void writeChars(final char[] chars) throws IOException {
- underlying.writeChars(chars);
- }
-
- // ////////////////////////////////////////
- // Integral Numbers
- // ////////////////////////////////////////
-
- @Override
- public void write(final int b) throws IOException {
- underlying.write(b);
- }
-
- @Override
- public void writeByte(final int v) throws IOException {
- underlying.writeByte(v);
- }
-
- @Override
- public void write(final byte[] b) throws IOException {
- underlying.write(b);
- }
-
- @Override
- public void writeBytes(final byte[] bytes) throws IOException {
- underlying.writeBytes(bytes);
- }
-
- @Override
- public void writeShort(final int v) throws IOException {
- underlying.writeShort(v);
- }
-
- @Override
- public void writeShorts(final short[] shorts) throws IOException {
- underlying.writeShorts(shorts);
- }
-
- @Override
- public void writeInt(final int v) throws IOException {
- underlying.writeInt(v);
- }
-
- @Override
- public void writeInts(final int[] ints) throws IOException {
- underlying.writeInts(ints);
- }
-
- @Override
- public void writeLong(final long v) throws IOException {
- underlying.writeLong(v);
- }
-
- @Override
- public void writeLongs(final long[] longs) throws IOException {
- underlying.writeLongs(longs);
- }
-
- // ////////////////////////////////////////
- // Floating Point Numbers
- // ////////////////////////////////////////
-
- @Override
- public void writeFloat(final float v) throws IOException {
- underlying.writeFloat(v);
- }
-
- @Override
- public void writeFloats(final float[] floats) throws IOException {
- underlying.writeFloats(floats);
- }
-
- @Override
- public void writeDouble(final double v) throws IOException {
- underlying.writeDouble(v);
- }
-
- @Override
- public void writeDoubles(final double[] doubles) throws IOException {
- underlying.writeDoubles(doubles);
- }
-
- // ////////////////////////////////////////
- // Strings
- // ////////////////////////////////////////
-
- @Override
- public void writeUTF(final String str) throws IOException {
- underlying.writeUTF(str);
- }
-
- @Override
- public void writeUTFs(final String[] strings) throws IOException {
- underlying.writeUTFs(strings);
- }
-
- // ////////////////////////////////////////
- // Encodable and Serializable
- // ////////////////////////////////////////
-
- @Override
- public void writeEncodable(final Object encodable) throws IOException {
- underlying.writeEncodable(encodable);
- }
-
- @Override
- public void writeEncodables(final Object[] encodables) throws IOException {
- underlying.writeEncodables(encodables);
- }
-
- @Override
- public void writeSerializable(final Object serializable) throws IOException {
- underlying.writeSerializable(serializable);
- }
-
- @Override
- public void writeSerializables(final Object[] serializables) throws IOException {
- underlying.writeSerializables(serializables);
- }
-
- // ////////////////////////////////////////
- // Other
- // ////////////////////////////////////////
-
- @Override
- public void write(final byte[] b, final int off, final int len) throws IOException {
- underlying.write(b, off, len);
- }
-
- @Override
- public void writeBytes(final String s) throws IOException {
- underlying.writeBytes(s);
- }
-
- @Override
- public void writeChars(final String s) throws IOException {
- underlying.writeChars(s);
- }
-
- // ////////////////////////////////////////
- // Flush
- // ////////////////////////////////////////
-
- @Override
- public void flush() throws IOException {
- underlying.flush();
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+public class DataOutputExtendedDecorator implements DataOutputExtended {
+
+ private final DataOutputExtended underlying;
+
+ public DataOutputExtendedDecorator(final DataOutputExtended underlying) {
+ this.underlying = underlying;
+ }
+
+ @Override
+ public DataOutputStream getDataOutputStream() {
+ return underlying.getDataOutputStream();
+ }
+
+ // ////////////////////////////////////////
+ // Boolean, Char
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeBoolean(final boolean v) throws IOException {
+ underlying.writeBoolean(v);
+ }
+
+ @Override
+ public void writeBooleans(final boolean[] booleans) throws IOException {
+ underlying.writeBooleans(booleans);
+ }
+
+ @Override
+ public void writeChar(final int v) throws IOException {
+ underlying.writeChar(v);
+ }
+
+ @Override
+ public void writeChars(final char[] chars) throws IOException {
+ underlying.writeChars(chars);
+ }
+
+ // ////////////////////////////////////////
+ // Integral Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public void write(final int b) throws IOException {
+ underlying.write(b);
+ }
+
+ @Override
+ public void writeByte(final int v) throws IOException {
+ underlying.writeByte(v);
+ }
+
+ @Override
+ public void write(final byte[] b) throws IOException {
+ underlying.write(b);
+ }
+
+ @Override
+ public void writeBytes(final byte[] bytes) throws IOException {
+ underlying.writeBytes(bytes);
+ }
+
+ @Override
+ public void writeShort(final int v) throws IOException {
+ underlying.writeShort(v);
+ }
+
+ @Override
+ public void writeShorts(final short[] shorts) throws IOException {
+ underlying.writeShorts(shorts);
+ }
+
+ @Override
+ public void writeInt(final int v) throws IOException {
+ underlying.writeInt(v);
+ }
+
+ @Override
+ public void writeInts(final int[] ints) throws IOException {
+ underlying.writeInts(ints);
+ }
+
+ @Override
+ public void writeLong(final long v) throws IOException {
+ underlying.writeLong(v);
+ }
+
+ @Override
+ public void writeLongs(final long[] longs) throws IOException {
+ underlying.writeLongs(longs);
+ }
+
+ // ////////////////////////////////////////
+ // Floating Point Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeFloat(final float v) throws IOException {
+ underlying.writeFloat(v);
+ }
+
+ @Override
+ public void writeFloats(final float[] floats) throws IOException {
+ underlying.writeFloats(floats);
+ }
+
+ @Override
+ public void writeDouble(final double v) throws IOException {
+ underlying.writeDouble(v);
+ }
+
+ @Override
+ public void writeDoubles(final double[] doubles) throws IOException {
+ underlying.writeDoubles(doubles);
+ }
+
+ // ////////////////////////////////////////
+ // Strings
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeUTF(final String str) throws IOException {
+ underlying.writeUTF(str);
+ }
+
+ @Override
+ public void writeUTFs(final String[] strings) throws IOException {
+ underlying.writeUTFs(strings);
+ }
+
+ // ////////////////////////////////////////
+ // Encodable and Serializable
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeEncodable(final Object encodable) throws IOException {
+ underlying.writeEncodable(encodable);
+ }
+
+ @Override
+ public void writeEncodables(final Object[] encodables) throws IOException {
+ underlying.writeEncodables(encodables);
+ }
+
+ @Override
+ public void writeSerializable(final Object serializable) throws IOException {
+ underlying.writeSerializable(serializable);
+ }
+
+ @Override
+ public void writeSerializables(final Object[] serializables) throws IOException {
+ underlying.writeSerializables(serializables);
+ }
+
+ // ////////////////////////////////////////
+ // Other
+ // ////////////////////////////////////////
+
+ @Override
+ public void write(final byte[] b, final int off, final int len) throws IOException {
+ underlying.write(b, off, len);
+ }
+
+ @Override
+ public void writeBytes(final String s) throws IOException {
+ underlying.writeBytes(s);
+ }
+
+ @Override
+ public void writeChars(final String s) throws IOException {
+ underlying.writeChars(s);
+ }
+
+ // ////////////////////////////////////////
+ // Flush
+ // ////////////////////////////////////////
+
+ @Override
+ public void flush() throws IOException {
+ underlying.flush();
+ }
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputStreamExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputStreamExtended.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputStreamExtended.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DataOutputStreamExtended.java Fri Jul 6 10:51:16 2012
@@ -1,227 +1,227 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Serializable;
-
-public class DataOutputStreamExtended implements DataOutputExtended {
-
- private final DataOutputStream dataOutputStream;
-
- public DataOutputStreamExtended(final OutputStream output) {
- dataOutputStream = new DataOutputStream(output);
- }
-
- @Override
- public DataOutputStream getDataOutputStream() {
- return dataOutputStream;
- }
-
- // ////////////////////////////////////////
- // Boolean, Char
- // ////////////////////////////////////////
-
- @Override
- public void writeBoolean(final boolean value) throws IOException {
- FieldType.BOOLEAN.write(this, value);
- }
-
- @Override
- public void writeBooleans(final boolean[] value) throws IOException {
- FieldType.BOOLEAN_ARRAY.write(this, value);
- }
-
- @Override
- public void writeChar(final int value) throws IOException {
- FieldType.CHAR.write(this, (char) value);
- }
-
- @Override
- public void writeChars(final char[] value) throws IOException {
- FieldType.CHAR_ARRAY.write(this, value);
- }
-
-
- // ////////////////////////////////////////
- // Integral Numbers
- // ////////////////////////////////////////
-
- @Override
- public void write(final int value) throws IOException {
- writeByte((byte) value);
- }
-
- @Override
- public void writeByte(final int value) throws IOException {
- FieldType.BYTE.write(this, (byte) value);
- }
-
- @Override
- public void write(final byte[] value) throws IOException {
- writeBytes(value);
- }
-
- @Override
- public void writeBytes(final byte[] value) throws IOException {
- FieldType.BYTE_ARRAY.write(this, value);
- }
-
- @Override
- public void writeShort(final int value) throws IOException {
- FieldType.SHORT.write(this, (short) value);
- }
-
- @Override
- public void writeShorts(final short[] value) throws IOException {
- FieldType.SHORT_ARRAY.write(this, value);
- }
-
- @Override
- public void writeInt(final int value) throws IOException {
- FieldType.INTEGER.write(this, value);
- }
-
- @Override
- public void writeInts(final int[] value) throws IOException {
- FieldType.INTEGER_ARRAY.write(this, value);
- }
-
- @Override
- public void writeLong(final long value) throws IOException {
- FieldType.LONG.write(this, value);
- }
-
- @Override
- public void writeLongs(final long[] value) throws IOException {
- FieldType.LONG_ARRAY.write(this, value);
- }
-
- // ////////////////////////////////////////
- // Floating Point Numbers
- // ////////////////////////////////////////
-
- @Override
- public void writeFloat(final float value) throws IOException {
- FieldType.FLOAT.write(this, value);
- }
-
- @Override
- public void writeFloats(final float[] value) throws IOException {
- FieldType.FLOAT_ARRAY.write(this, value);
- }
-
- @Override
- public void writeDouble(final double value) throws IOException {
- FieldType.DOUBLE.write(this, value);
- }
-
- @Override
- public void writeDoubles(final double[] value) throws IOException {
- FieldType.DOUBLE_ARRAY.write(this, value);
- }
-
- // ////////////////////////////////////////
- // Strings
- // ////////////////////////////////////////
-
- @Override
- public void writeUTF(final String value) throws IOException {
- FieldType.STRING.write(this, value);
- }
-
- @Override
- public void writeUTFs(final String[] value) throws IOException {
- FieldType.STRING_ARRAY.write(this, value);
- }
-
- // ////////////////////////////////////////
- // Encodable and Serializable
- // ////////////////////////////////////////
-
- @Override
- public void writeEncodable(final Object encodable) throws IOException {
- FieldType.ENCODABLE.write(this, (Encodable) encodable);
- }
-
- @Override
- public void writeEncodables(final Object[] objects) throws IOException {
- Encodable[] encodables;
- if (objects == null) {
- encodables = null;
- } else {
- encodables = new Encodable[objects.length];
- for (int i = 0; i < encodables.length; i++) {
- encodables[i] = (Encodable) objects[i];
- }
- }
- FieldType.ENCODABLE_ARRAY.write(this, encodables);
- }
-
- @Override
- public void writeSerializable(final Object serializable) throws IOException {
- FieldType.SERIALIZABLE.write(this, (Serializable) serializable);
- }
-
- @Override
- public void writeSerializables(final Object[] objects) throws IOException {
- Serializable[] serializeables;
- if (objects == null) {
- serializeables = null;
- } else {
- serializeables = new Serializable[objects.length];
- for (int i = 0; i < serializeables.length; i++) {
- serializeables[i] = (Serializable) objects[i];
- }
- }
- FieldType.SERIALIZABLE_ARRAY.write(this, serializeables);
- }
-
- // ////////////////////////////////////////
- // Other
- // ////////////////////////////////////////
-
- @Override
- public void write(final byte[] b, final int off, final int len) throws IOException {
- dataOutputStream.write(b, off, len);
- }
-
- @Override
- public void writeBytes(final String str) throws IOException {
- dataOutputStream.writeBytes(str);
- }
-
- @Override
- public void writeChars(final String str) throws IOException {
- dataOutputStream.writeChars(str);
- }
-
- // ////////////////////////////////////////
- // Flushable
- // ////////////////////////////////////////
-
- @Override
- public void flush() throws IOException {
- dataOutputStream.flush();
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+public class DataOutputStreamExtended implements DataOutputExtended {
+
+ private final DataOutputStream dataOutputStream;
+
+ public DataOutputStreamExtended(final OutputStream output) {
+ dataOutputStream = new DataOutputStream(output);
+ }
+
+ @Override
+ public DataOutputStream getDataOutputStream() {
+ return dataOutputStream;
+ }
+
+ // ////////////////////////////////////////
+ // Boolean, Char
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeBoolean(final boolean value) throws IOException {
+ FieldType.BOOLEAN.write(this, value);
+ }
+
+ @Override
+ public void writeBooleans(final boolean[] value) throws IOException {
+ FieldType.BOOLEAN_ARRAY.write(this, value);
+ }
+
+ @Override
+ public void writeChar(final int value) throws IOException {
+ FieldType.CHAR.write(this, (char) value);
+ }
+
+ @Override
+ public void writeChars(final char[] value) throws IOException {
+ FieldType.CHAR_ARRAY.write(this, value);
+ }
+
+
+ // ////////////////////////////////////////
+ // Integral Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public void write(final int value) throws IOException {
+ writeByte((byte) value);
+ }
+
+ @Override
+ public void writeByte(final int value) throws IOException {
+ FieldType.BYTE.write(this, (byte) value);
+ }
+
+ @Override
+ public void write(final byte[] value) throws IOException {
+ writeBytes(value);
+ }
+
+ @Override
+ public void writeBytes(final byte[] value) throws IOException {
+ FieldType.BYTE_ARRAY.write(this, value);
+ }
+
+ @Override
+ public void writeShort(final int value) throws IOException {
+ FieldType.SHORT.write(this, (short) value);
+ }
+
+ @Override
+ public void writeShorts(final short[] value) throws IOException {
+ FieldType.SHORT_ARRAY.write(this, value);
+ }
+
+ @Override
+ public void writeInt(final int value) throws IOException {
+ FieldType.INTEGER.write(this, value);
+ }
+
+ @Override
+ public void writeInts(final int[] value) throws IOException {
+ FieldType.INTEGER_ARRAY.write(this, value);
+ }
+
+ @Override
+ public void writeLong(final long value) throws IOException {
+ FieldType.LONG.write(this, value);
+ }
+
+ @Override
+ public void writeLongs(final long[] value) throws IOException {
+ FieldType.LONG_ARRAY.write(this, value);
+ }
+
+ // ////////////////////////////////////////
+ // Floating Point Numbers
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeFloat(final float value) throws IOException {
+ FieldType.FLOAT.write(this, value);
+ }
+
+ @Override
+ public void writeFloats(final float[] value) throws IOException {
+ FieldType.FLOAT_ARRAY.write(this, value);
+ }
+
+ @Override
+ public void writeDouble(final double value) throws IOException {
+ FieldType.DOUBLE.write(this, value);
+ }
+
+ @Override
+ public void writeDoubles(final double[] value) throws IOException {
+ FieldType.DOUBLE_ARRAY.write(this, value);
+ }
+
+ // ////////////////////////////////////////
+ // Strings
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeUTF(final String value) throws IOException {
+ FieldType.STRING.write(this, value);
+ }
+
+ @Override
+ public void writeUTFs(final String[] value) throws IOException {
+ FieldType.STRING_ARRAY.write(this, value);
+ }
+
+ // ////////////////////////////////////////
+ // Encodable and Serializable
+ // ////////////////////////////////////////
+
+ @Override
+ public void writeEncodable(final Object encodable) throws IOException {
+ FieldType.ENCODABLE.write(this, (Encodable) encodable);
+ }
+
+ @Override
+ public void writeEncodables(final Object[] objects) throws IOException {
+ Encodable[] encodables;
+ if (objects == null) {
+ encodables = null;
+ } else {
+ encodables = new Encodable[objects.length];
+ for (int i = 0; i < encodables.length; i++) {
+ encodables[i] = (Encodable) objects[i];
+ }
+ }
+ FieldType.ENCODABLE_ARRAY.write(this, encodables);
+ }
+
+ @Override
+ public void writeSerializable(final Object serializable) throws IOException {
+ FieldType.SERIALIZABLE.write(this, (Serializable) serializable);
+ }
+
+ @Override
+ public void writeSerializables(final Object[] objects) throws IOException {
+ Serializable[] serializeables;
+ if (objects == null) {
+ serializeables = null;
+ } else {
+ serializeables = new Serializable[objects.length];
+ for (int i = 0; i < serializeables.length; i++) {
+ serializeables[i] = (Serializable) objects[i];
+ }
+ }
+ FieldType.SERIALIZABLE_ARRAY.write(this, serializeables);
+ }
+
+ // ////////////////////////////////////////
+ // Other
+ // ////////////////////////////////////////
+
+ @Override
+ public void write(final byte[] b, final int off, final int len) throws IOException {
+ dataOutputStream.write(b, off, len);
+ }
+
+ @Override
+ public void writeBytes(final String str) throws IOException {
+ dataOutputStream.writeBytes(str);
+ }
+
+ @Override
+ public void writeChars(final String str) throws IOException {
+ dataOutputStream.writeChars(str);
+ }
+
+ // ////////////////////////////////////////
+ // Flushable
+ // ////////////////////////////////////////
+
+ @Override
+ public void flush() throws IOException {
+ dataOutputStream.flush();
+ }
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java Fri Jul 6 10:51:16 2012
@@ -1,116 +1,116 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.apache.log4j.Logger;
-
-public class DebugDataInputExtended extends DataInputExtendedDecorator {
-
- private static final Logger LOG = Logger.getLogger(DebugDataInputExtended.class);
-
- public DebugDataInputExtended(final DataInputExtended input) {
- super(input);
- }
-
- @Override
- public boolean readBoolean() throws IOException {
- final boolean b = super.readBoolean();
- if (LOG.isDebugEnabled()) {
- LOG.debug("boolean: " + b);
- }
- return b;
- }
-
- @Override
- public byte readByte() throws IOException {
- final byte b = super.readByte();
- if (LOG.isDebugEnabled()) {
- LOG.debug("byte: " + b);
- }
- return b;
- }
-
- @Override
- public byte[] readBytes() throws IOException {
- final byte[] bs = super.readBytes();
- if (LOG.isDebugEnabled()) {
- LOG.debug("bytes: " + new String(bs));
- }
- return bs;
- }
-
- @Override
- public int readInt() throws IOException {
- final int i = super.readInt();
- if (LOG.isDebugEnabled()) {
- LOG.debug("int: " + i);
- }
- return i;
- }
-
- @Override
- public long readLong() throws IOException {
- final long l = super.readLong();
- if (LOG.isDebugEnabled()) {
- LOG.debug("long: " + l);
- }
- return l;
- }
-
- @Override
- public String readUTF() throws IOException {
- final String string = super.readUTF();
- if (LOG.isDebugEnabled()) {
- LOG.debug("string: " + string);
- }
- return string;
- }
-
- @Override
- public String[] readUTFs() throws IOException {
- final String[] strings = super.readUTFs();
- if (LOG.isDebugEnabled()) {
- LOG.debug("list: " + Arrays.toString(strings));
- }
- return strings;
- }
-
- @Override
- public <T> T readEncodable(final Class<T> encodableType) throws IOException {
- final T object = super.readEncodable(encodableType);
- if (LOG.isDebugEnabled()) {
- LOG.debug(">>> object");
- }
- return object;
- }
-
- @Override
- public <T> T[] readEncodables(final Class<T> encodableType) throws IOException {
- final T[] objects = super.readEncodables(encodableType);
- if (LOG.isDebugEnabled()) {
- LOG.debug(">>> objects x" + objects.length);
- }
- return objects;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.apache.log4j.Logger;
+
+public class DebugDataInputExtended extends DataInputExtendedDecorator {
+
+ private static final Logger LOG = Logger.getLogger(DebugDataInputExtended.class);
+
+ public DebugDataInputExtended(final DataInputExtended input) {
+ super(input);
+ }
+
+ @Override
+ public boolean readBoolean() throws IOException {
+ final boolean b = super.readBoolean();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("boolean: " + b);
+ }
+ return b;
+ }
+
+ @Override
+ public byte readByte() throws IOException {
+ final byte b = super.readByte();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("byte: " + b);
+ }
+ return b;
+ }
+
+ @Override
+ public byte[] readBytes() throws IOException {
+ final byte[] bs = super.readBytes();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("bytes: " + new String(bs));
+ }
+ return bs;
+ }
+
+ @Override
+ public int readInt() throws IOException {
+ final int i = super.readInt();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("int: " + i);
+ }
+ return i;
+ }
+
+ @Override
+ public long readLong() throws IOException {
+ final long l = super.readLong();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("long: " + l);
+ }
+ return l;
+ }
+
+ @Override
+ public String readUTF() throws IOException {
+ final String string = super.readUTF();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("string: " + string);
+ }
+ return string;
+ }
+
+ @Override
+ public String[] readUTFs() throws IOException {
+ final String[] strings = super.readUTFs();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("list: " + Arrays.toString(strings));
+ }
+ return strings;
+ }
+
+ @Override
+ public <T> T readEncodable(final Class<T> encodableType) throws IOException {
+ final T object = super.readEncodable(encodableType);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(">>> object");
+ }
+ return object;
+ }
+
+ @Override
+ public <T> T[] readEncodables(final Class<T> encodableType) throws IOException {
+ final T[] objects = super.readEncodables(encodableType);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(">>> objects x" + objects.length);
+ }
+ return objects;
+ }
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java Fri Jul 6 10:51:16 2012
@@ -1,113 +1,113 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-
-public class DebugDataOutputExtended extends DataOutputExtendedDecorator {
-
- private static final Logger LOG = Logger.getLogger(DebugDataOutputExtended.class);
-
- public DebugDataOutputExtended(final DataOutputExtended underlying) {
- super(underlying);
- }
-
- @Override
- public void writeBoolean(final boolean flag) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("boolean: " + flag);
- }
- super.writeBoolean(flag);
- }
-
- @Override
- public void writeBytes(final byte[] value) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("bytes: (" + value.length + ") " + new String(value));
- }
- super.writeBytes(value);
- }
-
- @Override
- public void writeByte(final int value) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("byte: " + value);
- }
- super.writeByte(value);
- }
-
- @Override
- public void writeInt(final int value) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("int: " + value);
- }
- super.writeInt(value);
- }
-
- @Override
- public void writeLong(final long value) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("long: " + value);
- }
- super.writeLong(value);
- }
-
- @Override
- public void writeEncodable(final Object object) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug(">>> object: (" + object + ")");
- }
- super.writeEncodable(object);
- }
-
- @Override
- public void writeEncodables(final Object[] objects) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug(">>> objects x" + objects.length);
- }
- super.writeEncodables(objects);
- }
-
- @Override
- public void writeUTF(final String str) throws IOException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("string: " + str);
- }
- super.writeUTF(str);
- }
-
- @Override
- public void writeUTFs(final String[] strings) throws IOException {
- if (LOG.isDebugEnabled()) {
- final StringBuffer l = new StringBuffer();
- for (int i = 0; i < strings.length; i++) {
- if (i > 0) {
- l.append(", ");
- }
- l.append(strings[i]);
- }
- LOG.debug("list: " + l);
- }
- super.writeUTFs(strings);
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.IOException;
+
+import org.apache.log4j.Logger;
+
+public class DebugDataOutputExtended extends DataOutputExtendedDecorator {
+
+ private static final Logger LOG = Logger.getLogger(DebugDataOutputExtended.class);
+
+ public DebugDataOutputExtended(final DataOutputExtended underlying) {
+ super(underlying);
+ }
+
+ @Override
+ public void writeBoolean(final boolean flag) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("boolean: " + flag);
+ }
+ super.writeBoolean(flag);
+ }
+
+ @Override
+ public void writeBytes(final byte[] value) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("bytes: (" + value.length + ") " + new String(value));
+ }
+ super.writeBytes(value);
+ }
+
+ @Override
+ public void writeByte(final int value) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("byte: " + value);
+ }
+ super.writeByte(value);
+ }
+
+ @Override
+ public void writeInt(final int value) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("int: " + value);
+ }
+ super.writeInt(value);
+ }
+
+ @Override
+ public void writeLong(final long value) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("long: " + value);
+ }
+ super.writeLong(value);
+ }
+
+ @Override
+ public void writeEncodable(final Object object) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(">>> object: (" + object + ")");
+ }
+ super.writeEncodable(object);
+ }
+
+ @Override
+ public void writeEncodables(final Object[] objects) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(">>> objects x" + objects.length);
+ }
+ super.writeEncodables(objects);
+ }
+
+ @Override
+ public void writeUTF(final String str) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("string: " + str);
+ }
+ super.writeUTF(str);
+ }
+
+ @Override
+ public void writeUTFs(final String[] strings) throws IOException {
+ if (LOG.isDebugEnabled()) {
+ final StringBuffer l = new StringBuffer();
+ for (int i = 0; i < strings.length; i++) {
+ if (i > 0) {
+ l.append(", ");
+ }
+ l.append(strings[i]);
+ }
+ LOG.debug("list: " + l);
+ }
+ super.writeUTFs(strings);
+ }
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java Fri Jul 6 10:51:16 2012
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-import java.io.IOException;
-
-/**
- * This interface indicates that an object can be encoded into into a byte array
- * so it can be streamed.
- *
- * <p>
- * By implementing this interface you are agreeing to provide a constructor with
- * a single argument of type {@link DataInputExtended}, which create an instance
- * from the stream.
- */
-public interface Encodable {
-
- /**
- * Returns the domain object's value as an encoded byte array via the
- * encoder.
- */
- void encode(DataOutputExtended outputStream) throws IOException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+import java.io.IOException;
+
+/**
+ * This interface indicates that an object can be encoded into into a byte array
+ * so it can be streamed.
+ *
+ * <p>
+ * By implementing this interface you are agreeing to provide a constructor with
+ * a single argument of type {@link DataInputExtended}, which create an instance
+ * from the stream.
+ */
+public interface Encodable {
+
+ /**
+ * Returns the domain object's value as an encoded byte array via the
+ * encoder.
+ */
+ void encode(DataOutputExtended outputStream) throws IOException;
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java Fri Jul 6 10:51:16 2012
@@ -1,29 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.commons.encoding;
-
-public class EncodingConstants {
-
- static final String ENCODED_NULL_ARRAY = "$$.$null-array$.$$";
- static final String ENCODED_BOOLEAN_FALSE = "$$.$false$.$$";
- static final String ENCODED_BOOLEAN_TRUE = "$$.$true$.$$";
- static final String ENCODED_NULL_OBJECT = "$$.$null$.$$";
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.commons.encoding;
+
+public class EncodingConstants {
+
+ static final String ENCODED_NULL_ARRAY = "$$.$null-array$.$$";
+ static final String ENCODED_BOOLEAN_FALSE = "$$.$false$.$$";
+ static final String ENCODED_BOOLEAN_TRUE = "$$.$true$.$$";
+ static final String ENCODED_NULL_OBJECT = "$$.$null$.$$";
+
+}
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java Fri Jul 6 10:51:16 2012
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.commons.encoding;
-
-import java.io.IOException;
-
-public class FailedToDecodeException extends IOException {
-
- private static final long serialVersionUID = 1L;
-
- private final Throwable cause;
-
- public FailedToDecodeException(final Throwable cause) {
- this.cause = cause;
- }
-
- @Override
- public Throwable getCause() {
- return cause;
- }
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.commons.encoding;
+
+import java.io.IOException;
+
+public class FailedToDecodeException extends IOException {
+
+ private static final long serialVersionUID = 1L;
+
+ private final Throwable cause;
+
+ public FailedToDecodeException(final Throwable cause) {
+ this.cause = cause;
+ }
+
+ @Override
+ public Throwable getCause() {
+ return cause;
+ }
+
}
\ No newline at end of file
Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java?rev=1358111&r1=1358110&r2=1358111&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java (original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java Fri Jul 6 10:51:16 2012
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.commons.encoding;
-
-import java.io.IOException;
-
-public class FailedToDeserializeException extends IOException {
-
- private static final long serialVersionUID = 1L;
-
- private final Throwable cause;
-
- public FailedToDeserializeException(final ClassNotFoundException cause) {
- this.cause = cause;
- }
-
- @Override
- public Throwable getCause() {
- return cause;
- }
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.commons.encoding;
+
+import java.io.IOException;
+
+public class FailedToDeserializeException extends IOException {
+
+ private static final long serialVersionUID = 1L;
+
+ private final Throwable cause;
+
+ public FailedToDeserializeException(final ClassNotFoundException cause) {
+ this.cause = cause;
+ }
+
+ @Override
+ public Throwable getCause() {
+ return cause;
+ }
+
}
\ No newline at end of file