17
17
18
18
import uk .co .real_logic .artio .fields .DecimalFloat ;
19
19
import uk .co .real_logic .artio .util .AsciiBuffer ;
20
+ import uk .co .real_logic .artio .util .float_parsing .DecimalFloatOverflowHandler ;
20
21
21
22
import static uk .co .real_logic .artio .dictionary .generation .CodecUtil .MISSING_INT ;
22
23
import static uk .co .real_logic .artio .dictionary .generation .CodecUtil .MISSING_LONG ;
@@ -31,6 +32,7 @@ public abstract class CommonDecoderImpl
31
32
protected int invalidTagId = Decoder .NO_ERROR ;
32
33
protected int rejectReason = Decoder .NO_ERROR ;
33
34
protected AsciiBuffer buffer ;
35
+ protected DecimalFloatOverflowHandler decimalFloatOverflowHandler ;
34
36
35
37
public int invalidTagId ()
36
38
{
@@ -82,11 +84,12 @@ public long getLong(
82
84
83
85
public DecimalFloat getFloat (
84
86
final AsciiBuffer buffer ,
85
- final DecimalFloat number , final int offset , final int length , final int tag , final boolean validation )
87
+ final DecimalFloat number , final int offset , final int length , final int tag , final boolean validation ,
88
+ final DecimalFloatOverflowHandler decimalFloatOverflowHandler )
86
89
{
87
90
try
88
91
{
89
- return buffer .getFloat (number , offset , length );
92
+ return buffer .getFloat (number , offset , length , tag , decimalFloatOverflowHandler );
90
93
}
91
94
catch (final NumberFormatException | ArithmeticException e )
92
95
{
@@ -104,6 +107,14 @@ public DecimalFloat getFloat(
104
107
}
105
108
}
106
109
110
+ public DecimalFloat getFloat (
111
+ final AsciiBuffer buffer ,
112
+ final DecimalFloat number , final int offset , final int length , final int tag , final boolean validation )
113
+ {
114
+ return getFloat (buffer , number , offset , length , tag , validation , null );
115
+ }
116
+
117
+
107
118
public int getIntFlyweight (
108
119
final AsciiBuffer buffer , final int offset , final int length , final int tag , final boolean validation )
109
120
{
@@ -168,11 +179,12 @@ public DecimalFloat getFloatFlyweight(
168
179
final int offset ,
169
180
final int length ,
170
181
final int tag ,
171
- final boolean codecValidationEnabled )
182
+ final boolean codecValidationEnabled ,
183
+ final DecimalFloatOverflowHandler decimalFloatOverflowHandler )
172
184
{
173
185
try
174
186
{
175
- return buffer .getFloat (number , offset , length );
187
+ return buffer .getFloat (number , offset , length , tag , decimalFloatOverflowHandler );
176
188
}
177
189
catch (final NumberFormatException e )
178
190
{
@@ -187,4 +199,15 @@ public DecimalFloat getFloatFlyweight(
187
199
}
188
200
}
189
201
}
202
+
203
+ public DecimalFloat getFloatFlyweight (
204
+ final AsciiBuffer buffer ,
205
+ final DecimalFloat number ,
206
+ final int offset ,
207
+ final int length ,
208
+ final int tag ,
209
+ final boolean codecValidationEnabled )
210
+ {
211
+ return getFloatFlyweight (buffer , number , offset , length , tag , codecValidationEnabled , null );
212
+ }
190
213
}
0 commit comments