@@ -50,13 +50,13 @@ public class SmileFactory
50
50
* Bitfield (set of flags) of all parser features that are enabled
51
51
* by default.
52
52
*/
53
- final static int DEFAULT_SMILE_PARSER_FEATURE_FLAGS = SmileParser . Feature .collectDefaults ();
53
+ final static int DEFAULT_SMILE_PARSER_FEATURE_FLAGS = SmileReadFeature .collectDefaults ();
54
54
55
55
/**
56
56
* Bitfield (set of flags) of all generator features that are enabled
57
57
* by default.
58
58
*/
59
- final static int DEFAULT_SMILE_GENERATOR_FEATURE_FLAGS = SmileGenerator . Feature .collectDefaults ();
59
+ final static int DEFAULT_SMILE_GENERATOR_FEATURE_FLAGS = SmileWriteFeature .collectDefaults ();
60
60
61
61
/*
62
62
/**********************************************************************
@@ -163,14 +163,14 @@ public Version version() {
163
163
/**
164
164
* Checked whether specified parser feature is enabled.
165
165
*/
166
- public final boolean isEnabled (SmileParser . Feature f ) {
166
+ public final boolean isEnabled (SmileReadFeature f ) {
167
167
return f .enabledIn (_formatReadFeatures );
168
168
}
169
169
170
170
/**
171
171
* Check whether specified generator feature is enabled.
172
172
*/
173
- public final boolean isEnabled (SmileGenerator . Feature f ) {
173
+ public final boolean isEnabled (SmileWriteFeature f ) {
174
174
return f .enabledIn (_formatWriteFeatures );
175
175
}
176
176
@@ -191,13 +191,13 @@ public boolean canUseSchema(FormatSchema schema) {
191
191
}
192
192
193
193
@ Override
194
- public Class <SmileParser . Feature > getFormatReadFeatureType () {
195
- return SmileParser . Feature .class ;
194
+ public Class <SmileReadFeature > getFormatReadFeatureType () {
195
+ return SmileReadFeature .class ;
196
196
}
197
197
198
198
@ Override
199
- public Class <SmileGenerator . Feature > getFormatWriteFeatureType () {
200
- return SmileGenerator . Feature .class ;
199
+ public Class <SmileWriteFeature > getFormatWriteFeatureType () {
200
+ return SmileWriteFeature .class ;
201
201
}
202
202
203
203
/*
@@ -274,15 +274,15 @@ protected JsonGenerator _createGenerator(ObjectWriteContext writeCtxt,
274
274
SmileGenerator gen = new SmileGenerator (writeCtxt , ioCtxt ,
275
275
writeCtxt .getStreamWriteFeatures (_streamWriteFeatures ),
276
276
smileFeatures , out );
277
- if (SmileGenerator . Feature .WRITE_HEADER .enabledIn (smileFeatures )) {
277
+ if (SmileWriteFeature .WRITE_HEADER .enabledIn (smileFeatures )) {
278
278
gen .writeHeader ();
279
279
} else {
280
- if (SmileGenerator . Feature .CHECK_SHARED_STRING_VALUES .enabledIn (smileFeatures )) {
280
+ if (SmileWriteFeature .CHECK_SHARED_STRING_VALUES .enabledIn (smileFeatures )) {
281
281
throw new StreamWriteException (gen ,
282
282
"Inconsistent settings: WRITE_HEADER disabled, but CHECK_SHARED_STRING_VALUES enabled; can not construct generator"
283
283
+" due to possible data loss (either enable WRITE_HEADER, or disable CHECK_SHARED_STRING_VALUES to resolve)" );
284
284
}
285
- if (!SmileGenerator . Feature .ENCODE_BINARY_AS_7BIT .enabledIn (smileFeatures )) {
285
+ if (!SmileWriteFeature .ENCODE_BINARY_AS_7BIT .enabledIn (smileFeatures )) {
286
286
throw new StreamWriteException (gen ,
287
287
"Inconsistent settings: WRITE_HEADER disabled, but ENCODE_BINARY_AS_7BIT disabled; can not construct generator"
288
288
+" due to possible data loss (either enable WRITE_HEADER, or ENCODE_BINARY_AS_7BIT to resolve)" );
0 commit comments