public class DescriptorLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.fasterxml.jackson.databind.ObjectReader |
_reader
Fully configured reader for
FileDescriptorSet objects. |
protected static String |
DESCRIPTOR_PROTO |
| Constructor and Description |
|---|
DescriptorLoader(com.fasterxml.jackson.databind.ObjectReader reader) |
| Modifier and Type | Method and Description |
|---|---|
static DescriptorLoader |
construct(com.fasterxml.jackson.databind.ObjectMapper mapper,
ProtobufSchemaLoader schemaLoader) |
static DescriptorLoader |
construct(ProtobufMapper mapper) |
FileDescriptorSet |
load(File src) |
FileDescriptorSet |
load(InputStream in)
Note: passed
InputStream will be closed by this method. |
FileDescriptorSet |
load(Reader r)
Note: passed
Reader will be closed by this method. |
FileDescriptorSet |
load(URL src) |
protected static final String DESCRIPTOR_PROTO
protected final com.fasterxml.jackson.databind.ObjectReader _reader
FileDescriptorSet objects.public DescriptorLoader(com.fasterxml.jackson.databind.ObjectReader reader)
reader - ObjectReader that is able to read protobuf input
(that is, must have been created from ProtobufMapper, or regular
mapper with ProtobufFactory),
and has been configured with `protoc` definition of `descriptor.proro`public static DescriptorLoader construct(ProtobufMapper mapper) throws IOException
IOExceptionpublic static DescriptorLoader construct(com.fasterxml.jackson.databind.ObjectMapper mapper, ProtobufSchemaLoader schemaLoader) throws IOException
mapper - ObjectMapper that can reader protoc content.IOExceptionpublic FileDescriptorSet load(URL src) throws IOException
IOExceptionpublic FileDescriptorSet load(File src) throws IOException
IOExceptionpublic FileDescriptorSet load(InputStream in) throws IOException
InputStream will be closed by this method.IOExceptionpublic FileDescriptorSet load(Reader r) throws IOException
Reader will be closed by this method.IOExceptionCopyright © 2019 FasterXML. All rights reserved.