Package nz.org.riskscape.engine.io
Interface TypeIO
- All Known Implementing Classes:
Anything
,Bool
,Date
,Decimal
,Floating
,Geom
,GeomType
,GeomType.Line
,GeomType.Point
,GeomType.Polygon
,Integer
,Nothing
,SimpleType
,Text
public interface TypeIO
java.nio based interface for reading and writing riskscape-typed objects from and to a ByteBuffer
.
# BufferUnderflowExceptions & Idempotence
These should be thrown (not wrapped and dealt with internally) - this will allow any outer reading/writing code to manipulate the buffer before retrying a read/write or write operation. A side-effect of this is that your IO code should not have any side effects.
-
Method Summary
Modifier and TypeMethodDescriptionread
(ByteBuffer buffer) Read a value from the given byte buffervoid
write
(ByteBuffer buffer, Object value) Write a value out to the given byte buffer
-
Method Details
-
writesType
Type writesType()- Returns:
- the exact type that this TypeIO can read/write
-
write
Write a value out to the given byte buffer
-
read
Read a value from the given byte buffer
-