Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.protobuf.schema

public Class DescriptorLoader

extends Object
Class Inheritance
Imports
java.io.File, .IOException, .InputStream, .Reader, java.net.URL, com.fasterxml.jackson.databind.ObjectMapper, .ObjectReader, com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper

Class used for loading protobuf descriptors (from .desc files or equivalent sources), to construct FileDescriptorSet.
Since
2.9

Field Summary

Modifier and TypeField and Description
protected final ObjectReader
_reader

Fully configured reader for FileDescriptorSet objects.

protected static final String

Constructor Summary

AccessConstructor and Description
public
DescriptorLoader(ObjectReader
ObjectReader that is able to read protobuf input (that is, must have been created from ProtobufMapper, or regular mapper with com.fasterxml.jackson.dataformat.protobuf.ProtobufFactory), and has been configured with `protoc` definition of `descriptor.proro`
reader
)

Method Summary

Modifier and TypeMethod and Description
public static DescriptorLoader
public static DescriptorLoader
construct(ObjectMapper
ObjectMapper that can reader protoc content.
mapper
,
ProtobufSchemaLoader schemaLoader)

public FileDescriptorSet
load(URL src)

public FileDescriptorSet
load(File src)

public FileDescriptorSet
load(InputStream in)

Note

passed java.io.InputStream will be closed by this method.

public FileDescriptorSet
load(Reader r)

Note

passed java.io.Reader will be closed by this method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_readerback to summary
protected final ObjectReader _reader

Fully configured reader for FileDescriptorSet objects.

DESCRIPTOR_PROTOback to summary
protected static final String DESCRIPTOR_PROTO

Constructor Detail

DescriptorLoaderback to summary
public DescriptorLoader(ObjectReader reader)
Parameters
reader:ObjectReader

ObjectReader that is able to read protobuf input (that is, must have been created from ProtobufMapper, or regular mapper with com.fasterxml.jackson.dataformat.protobuf.ProtobufFactory), and has been configured with `protoc` definition of `descriptor.proro`

Method Detail

constructback to summary
public static DescriptorLoader construct(ProtobufMapper mapper) throws IOException
constructback to summary
public static DescriptorLoader construct(ObjectMapper mapper, ProtobufSchemaLoader schemaLoader) throws IOException
Parameters
mapper:ObjectMapper

ObjectMapper that can reader protoc content.

loadback to summary
public FileDescriptorSet load(URL src) throws IOException
loadback to summary
public FileDescriptorSet load(File src) throws IOException
loadback to summary
public FileDescriptorSet load(InputStream in) throws IOException

Note

passed java.io.InputStream will be closed by this method.

loadback to summary
public FileDescriptorSet load(Reader r) throws IOException

Note

passed java.io.Reader will be closed by this method.