Tabnine Logo
com.caucho.hessian.io
Code IndexAdd Tabnine to your IDE (free)

How to use com.caucho.hessian.io

Best Java code snippets using com.caucho.hessian.io (Showing top 20 results out of 387)

origin: spring-projects/spring-framework

/**
 * Set whether to send the Java collection type for each serialized
 * collection. Default is "true".
 */
public void setSendCollectionType(boolean sendCollectionType) {
  this.serializerFactory.setSendCollectionType(sendCollectionType);
}
origin: spring-projects/spring-framework

/**
 * Set whether to allow non-serializable types as Hessian arguments
 * and return values. Default is "true".
 */
public void setAllowNonSerializable(boolean allowNonSerializable) {
  this.serializerFactory.setAllowNonSerializable(allowNonSerializable);
}
origin: alipay/sofa-rpc

@Override
protected Serializer getDefaultSerializer(Class cl) {
  if (_defaultSerializer != null) {
    return _defaultSerializer;
  }
  return new JavaSerializer(cl);
}
origin: ltsopensource/light-task-scheduler

@SuppressWarnings("unchecked")
@Override
public <T> T deserialize(byte[] data, Class<T> clazz) throws Exception {
  UnsafeByteArrayInputStream bin = new UnsafeByteArrayInputStream(data);
  Hessian2Input in = new Hessian2Input(bin);
  in.startMessage();
  Object obj = in.readObject(clazz);
  in.completeMessage();
  in.close();
  return (T) obj;
}
origin: ltsopensource/light-task-scheduler

@Override
public byte[] serialize(Object obj) throws Exception {
  UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream();
  Hessian2Output out = new Hessian2Output(bos);
  out.startMessage();
  out.writeObject(obj);
  out.completeMessage();
  out.close();
  return bos.toByteArray();
}
origin: weibocom/motan

@Override
public byte[] serialize(Object data) throws IOException {
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  Hessian2Output out = new Hessian2Output(bos);
  out.writeObject(data);
  out.flush();
  return bos.toByteArray();
}
origin: weibocom/motan

@SuppressWarnings("unchecked")
@Override
public <T> T deserialize(byte[] data, Class<T> clz) throws IOException {
  Hessian2Input input = new Hessian2Input(new ByteArrayInputStream(data));
  return (T) input.readObject(clz);
}
origin: qiujiayu/AutoLoadCache

@Override
public Object deserialize(final byte[] bytes, final Type returnType) throws Exception {
  if (null == bytes || bytes.length == 0) {
    return null;
  }
  ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
  AbstractHessianInput input = new Hessian2Input(inputStream);
  input.setSerializerFactory(SERIALIZER_FACTORY);
  Object obj = input.readObject();
  input.close();
  return obj;
}
origin: spring-projects/spring-framework

/**
 * Specify the Hessian SerializerFactory to use.
 * <p>This will typically be passed in as an inner bean definition
 * of type {@code com.caucho.hessian.io.SerializerFactory},
 * with custom bean property values applied.
 */
public void setSerializerFactory(@Nullable SerializerFactory serializerFactory) {
  this.serializerFactory = (serializerFactory != null ? serializerFactory : new SerializerFactory());
}
origin: qiujiayu/AutoLoadCache

/**
 * 添加自定义SerializerFactory
 *
 * @param factory AbstractSerializerFactory
 */
public void addSerializerFactory(AbstractSerializerFactory factory) {
  SERIALIZER_FACTORY.addFactory(factory);
}
origin: weibocom/motan

@Override
public byte[] serializeMulti(Object[] data) throws IOException {
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  Hessian2Output out = new Hessian2Output(bos);
  for(Object obj: data){
    out.writeObject(obj);
  }
  out.flush();
  return bos.toByteArray();
}
origin: weibocom/motan

@Override
public Object[] deserializeMulti(byte[] data, Class<?>[] classes) throws IOException {
  Hessian2Input input = new Hessian2Input(new ByteArrayInputStream(data));
  Object[] objects = new Object[classes.length];
  for (int i = 0; i < classes.length; i++) {
    objects[i] = input.readObject(classes[i]);
  }
  return objects;
}
origin: org.springframework/spring-web

/**
 * Set whether to send the Java collection type for each serialized
 * collection. Default is "true".
 */
public void setSendCollectionType(boolean sendCollectionType) {
  this.serializerFactory.setSendCollectionType(sendCollectionType);
}
origin: org.springframework/spring-web

/**
 * Specify the Hessian SerializerFactory to use.
 * <p>This will typically be passed in as an inner bean definition
 * of type {@code com.caucho.hessian.io.SerializerFactory},
 * with custom bean property values applied.
 */
public void setSerializerFactory(@Nullable SerializerFactory serializerFactory) {
  this.serializerFactory = (serializerFactory != null ? serializerFactory : new SerializerFactory());
}
origin: org.springframework/spring-web

/**
 * Set whether to allow non-serializable types as Hessian arguments
 * and return values. Default is "true".
 */
public void setAllowNonSerializable(boolean allowNonSerializable) {
  this.serializerFactory.setAllowNonSerializable(allowNonSerializable);
}
origin: alipay/sofa-rpc

@Override
protected Serializer getDefaultSerializer(Class cl) {
  if (_defaultSerializer != null) {
    return _defaultSerializer;
  }
  return new JavaSerializer(cl);
}
origin: spring-projects/spring-framework

/**
 * Set whether to send the Java collection type for each serialized
 * collection. Default is "true".
 */
public void setSendCollectionType(boolean sendCollectionType) {
  this.proxyFactory.getSerializerFactory().setSendCollectionType(sendCollectionType);
}
origin: spring-projects/spring-framework

/**
 * Set whether to allow non-serializable types as Hessian arguments
 * and return values. Default is "true".
 */
public void setAllowNonSerializable(boolean allowNonSerializable) {
  this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable);
}
origin: org.springframework/spring-web

/**
 * Set whether to send the Java collection type for each serialized
 * collection. Default is "true".
 */
public void setSendCollectionType(boolean sendCollectionType) {
  this.proxyFactory.getSerializerFactory().setSendCollectionType(sendCollectionType);
}
origin: org.springframework/spring-web

/**
 * Set whether to allow non-serializable types as Hessian arguments
 * and return values. Default is "true".
 */
public void setAllowNonSerializable(boolean allowNonSerializable) {
  this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable);
}
com.caucho.hessian.io

Most used classes

  • Hessian2Output
    Output stream for Hessian 2 requests.Since HessianOutput does not depend on any classes other than i
  • Hessian2Input
    Input stream for Hessian requests.HessianInput is unbuffered, so any client needs to provide its own
  • HessianOutput
    Output stream for Hessian requests, compatible with microedition Java. It only uses classes and type
  • HessianInput
    Input stream for Hessian requests.HessianInput is unbuffered, so any client needs to provide its own
  • SerializerFactory
    Factory for returning serialization methods.
  • AbstractHessianInput,
  • HessianDebugInputStream,
  • HessianDebugOutputStream,
  • JavaSerializer,
  • AbstractSerializerFactory,
  • JavaDeserializer,
  • ArrayDeserializer,
  • HessianProtocolException,
  • HessianFactory,
  • HessianRemote,
  • IOExceptionWrapper,
  • AbstractDeserializer,
  • AbstractListDeserializer,
  • AbstractMapDeserializer
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