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
IOException
public static DescriptorLoader construct(com.fasterxml.jackson.databind.ObjectMapper mapper, ProtobufSchemaLoader schemaLoader) throws IOException
mapper
- ObjectMapper
that can reader protoc content.IOException
public FileDescriptorSet load(URL src) throws IOException
IOException
public FileDescriptorSet load(File src) throws IOException
IOException
public FileDescriptorSet load(InputStream in) throws IOException
InputStream
will be closed by this method.IOException
public FileDescriptorSet load(Reader r) throws IOException
Reader
will be closed by this method.IOException
Copyright © 2017 FasterXML. All rights reserved.