Package io.grpc

Class Metadata.LazyStreamBinaryKey<T>

java.lang.Object
io.grpc.Metadata.Key<T>
io.grpc.Metadata.LazyStreamBinaryKey<T>
Enclosing class:
Metadata

private static class Metadata.LazyStreamBinaryKey<T> extends Metadata.Key<T>
A binary key for values which should be serialized lazily to InputStreams.
  • Field Details

  • Constructor Details

  • Method Details

    • toBytes

      byte[] toBytes(T value)
      Description copied from class: Metadata.Key
      Serialize a metadata value to bytes.
      Specified by:
      toBytes in class Metadata.Key<T>
      Parameters:
      value - to serialize
      Returns:
      serialized version of value
    • parseBytes

      T parseBytes(byte[] serialized)
      Description copied from class: Metadata.Key
      Parse a serialized metadata value from bytes.
      Specified by:
      parseBytes in class Metadata.Key<T>
      Parameters:
      serialized - value of metadata to parse
      Returns:
      a parsed instance of type T
    • serializesToStreams

      boolean serializesToStreams()
      Description copied from class: Metadata.Key
      Returns whether this key will be serialized to bytes lazily.
      Overrides:
      serializesToStreams in class Metadata.Key<T>