]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/serialization/impl/IntSerializer.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / serialization / impl / IntSerializer.java
index 94f5f897a73060522d9c6a6493bc63f05d215955..78f4895f01296dd70e779d5df2719933d490d56b 100644 (file)
@@ -1,78 +1,78 @@
-package org.simantics.databoard.serialization.impl;\r
-\r
-import java.io.DataInput;\r
-import java.io.DataOutput;\r
-import java.io.IOException;\r
-\r
-import org.simantics.databoard.binding.IntegerBinding;\r
-import org.simantics.databoard.binding.error.BindingException;\r
-import org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer;\r
-\r
-public class IntSerializer  extends NonRecursiveSerializer {\r
-\r
-       IntegerBinding binding;\r
-       \r
-       public IntSerializer(IntegerBinding binding) { this.binding = binding; }\r
-       \r
-       @Override\r
-       public Object deserialize(DataInput in) throws IOException {\r
-               try {\r
-                       int value = in.readInt();\r
-                       return binding.create(value);\r
-               } catch (BindingException e) {\r
-                       throw new IOException( e ); \r
-               }\r
-       }\r
-       \r
-       @Override\r
-       public void deserializeTo(DataInput in, Object obj) throws IOException {\r
-               try {\r
-                       binding.setValue(obj, in.readInt());\r
-               } catch (BindingException e) {\r
-                       throw new IOException( e ); \r
-               }\r
-       }\r
-       \r
-       @Override\r
-       public void skip(DataInput in)\r
-                       throws IOException {\r
-               in.skipBytes(4);                        \r
-       }\r
-\r
-       @Override\r
-       public void serialize(DataOutput out, Object obj) throws IOException {\r
-               try {\r
-                       int value = binding.getValue_(obj);\r
-                       out.writeInt(value);\r
-               } catch (BindingException e) {\r
-                       throw new IOException( e ); \r
-               }\r
-       }\r
-\r
-       @Override\r
-       public Integer getConstantSize() {\r
-               return 4;\r
-       }\r
-\r
-       @Override\r
-       public int getSize(Object obj) {\r
-               return 4;\r
-       }\r
-       \r
-       @Override\r
-       public int getMinSize() {\r
-               return 4;\r
-       }\r
-       \r
-       public int getInt(DataInput in) throws IOException\r
-       {\r
-               return in.readInt();\r
-       }\r
-       \r
-       public void putInt(DataOutput out, int x) throws IOException\r
-       {\r
-               out.writeInt(x);\r
-       }\r
-       \r
-       \r
-}      \r
+package org.simantics.databoard.serialization.impl;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.simantics.databoard.binding.IntegerBinding;
+import org.simantics.databoard.binding.error.BindingException;
+import org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer;
+
+public class IntSerializer  extends NonRecursiveSerializer {
+
+       IntegerBinding binding;
+       
+       public IntSerializer(IntegerBinding binding) { this.binding = binding; }
+       
+       @Override
+       public Object deserialize(DataInput in) throws IOException {
+               try {
+                       int value = in.readInt();
+                       return binding.create(value);
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+       
+       @Override
+       public void deserializeTo(DataInput in, Object obj) throws IOException {
+               try {
+                       binding.setValue(obj, in.readInt());
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+       
+       @Override
+       public void skip(DataInput in)
+                       throws IOException {
+               in.skipBytes(4);                        
+       }
+
+       @Override
+       public void serialize(DataOutput out, Object obj) throws IOException {
+               try {
+                       int value = binding.getValue_(obj);
+                       out.writeInt(value);
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+
+       @Override
+       public Integer getConstantSize() {
+               return 4;
+       }
+
+       @Override
+       public int getSize(Object obj) {
+               return 4;
+       }
+       
+       @Override
+       public int getMinSize() {
+               return 4;
+       }
+       
+       public int getInt(DataInput in) throws IOException
+       {
+               return in.readInt();
+       }
+       
+       public void putInt(DataOutput out, int x) throws IOException
+       {
+               out.writeInt(x);
+       }
+       
+       
+}