This commit is contained in:
@@ -105,16 +105,16 @@ public final class BsonConvert extends Convert<BsonReader, BsonWriter> {
|
||||
return rs;
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final ByteBuffer... buffers) {
|
||||
if (type == null || buffers.length < 1) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new BsonByteBufferReader(buffers));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final InputStream in) {
|
||||
if (type == null || in == null) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new BsonStreamReader(in));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final ByteBuffer... buffers) {
|
||||
if (type == null || buffers.length < 1) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new BsonByteBufferReader(buffers));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final BsonReader reader) {
|
||||
if (type == null) return null;
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -100,16 +100,16 @@ public final class JsonConvert extends Convert<JsonReader, JsonWriter> {
|
||||
return rs;
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final ByteBuffer... buffers) {
|
||||
if (type == null || buffers == null || buffers.length == 0) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new JsonByteBufferReader(buffers));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final InputStream in) {
|
||||
if (type == null || in == null) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new JsonStreamReader(in));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final ByteBuffer... buffers) {
|
||||
if (type == null || buffers == null || buffers.length == 0) return null;
|
||||
return (T) factory.loadDecoder(type).convertFrom(new JsonByteBufferReader(buffers));
|
||||
}
|
||||
|
||||
public <T> T convertFrom(final Type type, final JsonReader reader) {
|
||||
if (type == null) return null;
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
Reference in New Issue
Block a user