This commit is contained in:
@@ -128,16 +128,19 @@ public final class JsonConvert extends TextConvert<JsonReader, JsonWriter> {
|
||||
return rs;
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final String text) {
|
||||
if (text == null) return null;
|
||||
return (V) convertFrom(Utility.charArray(text));
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final char[] text) {
|
||||
if (text == null) return null;
|
||||
return (V) convertFrom(text, 0, text.length);
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final char[] text, final int start, final int len) {
|
||||
if (text == null) return null;
|
||||
final JsonReader in = readerPool.get();
|
||||
@@ -147,21 +150,25 @@ public final class JsonConvert extends TextConvert<JsonReader, JsonWriter> {
|
||||
return (V) rs;
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final InputStream in) {
|
||||
if (in == null) return null;
|
||||
return (V) new AnyDecoder(factory).convertFrom(new JsonStreamReader(in));
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final ByteBuffer... buffers) {
|
||||
if (buffers == null || buffers.length == 0) return null;
|
||||
return (V) new AnyDecoder(factory).convertFrom(new JsonByteBufferReader((ConvertMask) null, buffers));
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final ConvertMask mask, final ByteBuffer... buffers) {
|
||||
if (buffers == null || buffers.length == 0) return null;
|
||||
return (V) new AnyDecoder(factory).convertFrom(new JsonByteBufferReader(mask, buffers));
|
||||
}
|
||||
|
||||
//返回非null的值是由String、ArrayList、HashMap任意组合的对象
|
||||
public <V> V convertFrom(final JsonReader reader) {
|
||||
if (reader == null) return null;
|
||||
return (V) new AnyDecoder(factory).convertFrom(reader);
|
||||
|
||||
Reference in New Issue
Block a user