]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/serialization/impl/DoubleSerializer.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / serialization / impl / DoubleSerializer.java
index fd33a88e14f5dde3eaeb748085bc2e988e42929d..8061f2c9078c6d69ee0c3dba8c08ba63f5866850 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.DoubleBinding;\r
-import org.simantics.databoard.binding.error.BindingException;\r
-import org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer;\r
-\r
-public class DoubleSerializer extends NonRecursiveSerializer {\r
-\r
-       DoubleBinding binding;\r
-       \r
-       public DoubleSerializer(DoubleBinding binding) {this.binding = binding;}\r
-       \r
-       @Override\r
-       public Object deserialize(DataInput in) throws IOException {\r
-               try {\r
-                       double value = in.readDouble();\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
-                       double value = in.readDouble();\r
-                       binding.setValue(obj, value);\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(8);                        \r
-       }\r
-       \r
-       @Override\r
-       public void serialize(DataOutput out, Object obj) throws IOException {\r
-               try {\r
-                       double value = binding.getValue_(obj);\r
-                       out.writeDouble(value);\r
-               } catch (BindingException e) {\r
-                       throw new IOException( e ); \r
-               }\r
-       }\r
-\r
-       @Override\r
-       public Integer getConstantSize() {\r
-               return 8;\r
-       }\r
-\r
-       @Override\r
-       public int getSize(Object obj) {\r
-               return 8;\r
-       }\r
-       \r
-       @Override\r
-       public int getMinSize() {\r
-               return 8;\r
-       }\r
-       \r
-       public double getDouble(DataInput in) throws IOException\r
-       {\r
-               return in.readDouble();\r
-       }\r
-       \r
-       public void putDouble(DataOutput out, double x) throws IOException\r
-       {\r
-               out.writeDouble(x);\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.DoubleBinding;
+import org.simantics.databoard.binding.error.BindingException;
+import org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer;
+
+public class DoubleSerializer extends NonRecursiveSerializer {
+
+       DoubleBinding binding;
+       
+       public DoubleSerializer(DoubleBinding binding) {this.binding = binding;}
+       
+       @Override
+       public Object deserialize(DataInput in) throws IOException {
+               try {
+                       double value = in.readDouble();
+                       return binding.create(value);
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+       
+       @Override
+       public void deserializeTo(DataInput in, Object obj) throws IOException {
+               try {
+                       double value = in.readDouble();
+                       binding.setValue(obj, value);
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+
+       @Override
+       public void skip(DataInput in)
+                       throws IOException {
+               in.skipBytes(8);                        
+       }
+       
+       @Override
+       public void serialize(DataOutput out, Object obj) throws IOException {
+               try {
+                       double value = binding.getValue_(obj);
+                       out.writeDouble(value);
+               } catch (BindingException e) {
+                       throw new IOException( e ); 
+               }
+       }
+
+       @Override
+       public Integer getConstantSize() {
+               return 8;
+       }
+
+       @Override
+       public int getSize(Object obj) {
+               return 8;
+       }
+       
+       @Override
+       public int getMinSize() {
+               return 8;
+       }
+       
+       public double getDouble(DataInput in) throws IOException
+       {
+               return in.readDouble();
+       }
+       
+       public void putDouble(DataOutput out, double x) throws IOException
+       {
+               out.writeDouble(x);
+       }
+       
 }
\ No newline at end of file