@@ -163,10 +163,6 @@ public final boolean readNull() throws IOException {
163163 return false ;
164164 }
165165
166- public final boolean readBoolean (String cacheKey ) throws IOException {
167- return Codegen .getBooleanDecoder (cacheKey ).decodeBoolean (this );
168- }
169-
170166 public final boolean readBoolean () throws IOException {
171167 byte c = readByte ();
172168 switch (c ) {
@@ -181,10 +177,6 @@ public final boolean readBoolean() throws IOException {
181177 }
182178 }
183179
184- public final short readShort (String cacheKey ) throws IOException {
185- return Codegen .getShortDecoder (cacheKey ).decodeShort (this );
186- }
187-
188180 public final short readShort () throws IOException {
189181 int v = readInt ();
190182 if (Short .MIN_VALUE <= v && v <= Short .MAX_VALUE ) {
@@ -194,10 +186,6 @@ public final short readShort() throws IOException {
194186 }
195187 }
196188
197- public final int readInt (String cacheKey ) throws IOException {
198- return Codegen .getIntDecoder (cacheKey ).decodeInt (this );
199- }
200-
201189 public final int readInt () throws IOException {
202190 byte c = readByte ();
203191 if (c == '-' ) {
@@ -231,10 +219,6 @@ public final int readUnsignedInt() throws IOException {
231219 return result ;
232220 }
233221
234- public final long readLong (String cacheKey ) throws IOException {
235- return Codegen .getLongDecoder (cacheKey ).decodeLong (this );
236- }
237-
238222 public final long readLong () throws IOException {
239223 byte c = readByte ();
240224 if (c == '-' ) {
@@ -740,18 +724,10 @@ final String readNumber() throws IOException {
740724 return new String (reusableChars , 0 , j );
741725 }
742726
743- public final float readFloat (String cacheKey ) throws IOException {
744- return Codegen .getFloatDecoder (cacheKey ).decodeFloat (this );
745- }
746-
747727 public final float readFloat () throws IOException {
748728 return Float .valueOf (readNumber ());
749729 }
750730
751- public final double readDouble (String cacheKey ) throws IOException {
752- return Codegen .getDoubleDecoder (cacheKey ).decodeDouble (this );
753- }
754-
755731 public final double readDouble () throws IOException {
756732 return Double .valueOf (readNumber ());
757733 }
@@ -805,10 +781,6 @@ public final <T> T read(TypeLiteral<T> typeLiteral) throws IOException {
805781 return (T ) Codegen .getDecoder (typeLiteral .cacheKey , type ).decode (this );
806782 }
807783
808- public final <T > T read (String cacheKey ) throws IOException {
809- return (T ) Codegen .getDecoder (cacheKey , null ).decode (this );
810- }
811-
812784 public final void skip () throws IOException {
813785 byte c = readByte ();
814786 switch (c ) {
@@ -1029,10 +1001,6 @@ public static void registerFieldDecoder(TypeLiteral typeLiteral, String field, D
10291001 Codegen .addNewDecoder (field + "@" + typeLiteral .cacheKey , decoder );
10301002 }
10311003
1032- public static void clearDecoders () {
1033- Codegen .cache .clear ();
1034- }
1035-
10361004 public static void registerExtension (Extension extension ) {
10371005 Codegen .registerExtension (extension );
10381006 }
0 commit comments