Tabnine Logo
Codec.encode
Code IndexAdd Tabnine to your IDE (free)

How to use
encode
method
in
com.baidu.bjf.remoting.protobuf.Codec

Best Java code snippets using com.baidu.bjf.remoting.protobuf.Codec.encode (Showing top 14 results out of 315)

origin: com.baidu/brpc-java

@Override
public byte[] outputEncode(Object output) throws IOException {
  if (outputCodec != null) {
    return outputCodec.encode(output);
  }
  return null;
}
origin: jhunters/jprotobuf

/**
 * Encode.
 *
 * @return the byte[]
 * @throws IOException Signals that an I/O exception has occurred.
 */
public byte[] encode() throws IOException {
  return codec.encode(target);
}
origin: com.baidu/jprotobuf-rpc-core

@Override
public byte[] inputEncode(Object input) throws IOException {
  if (inputCodec != null) {
    return inputCodec.encode(input);
  }
  return null;
}
origin: com.baidu/brpc-java

@Override
public byte[] inputEncode(Object input) throws IOException {
  if (inputCodec != null) {
    return inputCodec.encode(input);
  }
  return null;
}
origin: baidu/brpc-java

@Override
public byte[] inputEncode(Object input) throws IOException {
  if (inputCodec != null) {
    return inputCodec.encode(input);
  }
  return null;
}
origin: baidu/brpc-java

@Override
public byte[] outputEncode(Object output) throws IOException {
  if (outputCodec != null) {
    return outputCodec.encode(output);
  }
  return null;
}
origin: com.baidu/jprotobuf-rpc-core

public byte[] write() {
  try {
    return CODEC.encode(this);
  } catch (IOException e) {
    throw new RuntimeException(e.getMessage(), e);
  }
}
origin: com.baidu/jprotobuf-rpc-core

public byte[] write() {
  try {
    return CODEC.encode(this);
  } catch (IOException e) {
    throw  new RuntimeException(e.getMessage(), e);
  }
}

origin: com.baidu/jprotobuf-rpc-core

public byte[] write() {
  try {
    return CODEC.encode(this);
  } catch (IOException e) {
    throw new RuntimeException(e.getMessage(), e);
  }
}
origin: com.baidu/jprotobuf-rpc-core

public byte[] write() {
  try {
    return CODEC.encode(this);
  } catch (IOException e) {
    throw new RuntimeException(e.getMessage(), e);
  }
}
origin: kingston-csj/jforgame

@Override
public byte[] serialize(Object o) {
  Codec codec = ProtobufProxy.create(o.getClass());
  try {
    return codec.encode(o);
  } catch (IOException e) {
    throw new IllegalArgumentException("serialize error", e);
  }
}
origin: kingston-csj/jforgame

@Override
public byte[] writeMessageBody(Message message) {
  //写入具体消息的内容
  byte[] body = null;
  Class<Message> msgClazz = (Class<Message>) message.getClass();
  try {
    Codec<Message> codec = ProtobufProxy.create(msgClazz);
    body = codec.encode(message);
  } catch (IOException e) {
    logger.error("", e);
  }
  return body;
}
origin: jhunters/jprotobuf

  Codec<FileDescriptorProtoPOJO> descriptorCodec = ProtobufProxy.create(FileDescriptorProtoPOJO.class,
      ProtobufProxy.isCacheEnabled(), ProtobufProxy.OUTPUT_PATH.get());
  byte[] bs = descriptorCodec.encode(fileDescriptorProto);
  fileproto = FileDescriptorProto.parseFrom(bs);
} catch (InvalidProtocolBufferException e) {
origin: com.baidu/jprotobuf-rpc-core

    byte[] response = outputCodec.encode(ret);
    retData.setData(response);
byte[] response = outputCodec.encode(ret);
retData.setData(response);
com.baidu.bjf.remoting.protobufCodecencode

Javadoc

Do byte encode action.

Popular methods of Codec

  • decode
  • size
  • writeTo

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now