Codota Logo
DeserializingConverter
Code IndexAdd Codota to your IDE (free)

How to use
DeserializingConverter
in
org.springframework.core.serializer.support

Best Java code snippets using org.springframework.core.serializer.support.DeserializingConverter (Showing top 15 results out of 315)

  • Common ways to obtain DeserializingConverter
private void myMethod () {
DeserializingConverter d =
  • Codota Iconnew DeserializingConverter()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-data-redis

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using a {@link ClassLoader}.
 *
 * @param classLoader the {@link ClassLoader} to use for deserialization. Can be {@literal null}.
 * @since 1.7
 */
public JdkSerializationRedisSerializer(@Nullable ClassLoader classLoader) {
  this(new SerializingConverter(), new DeserializingConverter(classLoader));
}
origin: spring-projects/spring-framework

@Test(expected = SerializationFailedException.class)
public void deserializationFailure() {
  DeserializingConverter fromBytes = new DeserializingConverter();
  fromBytes.convert("Junk".getBytes());
}
origin: spring-projects/spring-data-redis

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using the default class loader.
 */
public JdkSerializationRedisSerializer() {
  this(new SerializingConverter(), new DeserializingConverter());
}
origin: spring-projects/spring-framework

@Test
public void serializeAndDeserializeString() {
  SerializingConverter toBytes = new SerializingConverter();
  byte[] bytes = toBytes.convert("Testing");
  DeserializingConverter fromBytes = new DeserializingConverter();
  assertEquals("Testing", fromBytes.convert(bytes));
}
origin: spring-projects/spring-session

private static GenericConversionService createDefaultConversionService() {
  GenericConversionService converter = new GenericConversionService();
  converter.addConverter(Object.class, byte[].class,
      new SerializingConverter());
  converter.addConverter(byte[].class, Object.class,
      new DeserializingConverter());
  return converter;
}
origin: spring-projects/spring-session

private GenericConversionService createConversionServiceWithBeanClassLoader() {
  GenericConversionService conversionService = new GenericConversionService();
  conversionService.addConverter(Object.class, byte[].class,
      new SerializingConverter());
  conversionService.addConverter(byte[].class, Object.class,
      new DeserializingConverter(this.classLoader));
  return conversionService;
}
origin: org.springframework.data/spring-data-redis

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using a {@link ClassLoader}.
 *
 * @param classLoader the {@link ClassLoader} to use for deserialization. Can be {@literal null}.
 * @since 1.7
 */
public JdkSerializationRedisSerializer(@Nullable ClassLoader classLoader) {
  this(new SerializingConverter(), new DeserializingConverter(classLoader));
}
origin: org.springframework.data/spring-data-redis

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using the default class loader.
 */
public JdkSerializationRedisSerializer() {
  this(new SerializingConverter(), new DeserializingConverter());
}
origin: apache/servicemix-bundles

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using a {@link ClassLoader}.
 *
 * @param classLoader the {@link ClassLoader} to use for deserialization. Can be {@literal null}.
 * @since 1.7
 */
public JdkSerializationRedisSerializer(@Nullable ClassLoader classLoader) {
  this(new SerializingConverter(), new DeserializingConverter(classLoader));
}
origin: apache/servicemix-bundles

/**
 * Creates a new {@link JdkSerializationRedisSerializer} using the default class loader.
 */
public JdkSerializationRedisSerializer() {
  this(new SerializingConverter(), new DeserializingConverter());
}
origin: org.springframework.session/spring-session-data-mongodb

public JdkMongoSessionConverter(Duration maxInactiveInterval) {
  this(new SerializingConverter(), new DeserializingConverter(), maxInactiveInterval);
}
origin: com.giffing.wicket.spring.boot.starter/wicket-spring-boot-starter

public SpringDevToolsSerializer(){
  this.deserializer = new DeserializingConverter(new DefaultDeserializer(Thread.currentThread().getContextClassLoader()));
}
 
origin: MarcGiffing/wicket-spring-boot

public SpringDevToolsSerializer(){
  this.deserializer = new DeserializingConverter(new DefaultDeserializer(Thread.currentThread().getContextClassLoader()));
}

origin: org.springframework.session/spring-session-data-mongodb

@Bean
public MongoOperationsSessionRepository mongoSessionRepository(MongoOperations mongoOperations) {
  MongoOperationsSessionRepository repository = new MongoOperationsSessionRepository(mongoOperations);
  repository.setMaxInactiveIntervalInSeconds(this.maxInactiveIntervalInSeconds);
  if (this.mongoSessionConverter != null) {
    repository.setMongoSessionConverter(this.mongoSessionConverter);
  } else {
    JdkMongoSessionConverter mongoSessionConverter = new JdkMongoSessionConverter(
      new SerializingConverter(),
      new DeserializingConverter(this.classLoader),
      Duration.ofSeconds(MongoOperationsSessionRepository.DEFAULT_INACTIVE_INTERVAL));
    repository.setMongoSessionConverter(mongoSessionConverter);
  }
  if (StringUtils.hasText(this.collectionName)) {
    repository.setCollectionName(this.collectionName);
  }
  return repository;
}
origin: org.springframework.session/spring-session-data-mongodb

@Bean
public ReactiveMongoOperationsSessionRepository reactiveMongoOperationsSessionRepository(ReactiveMongoOperations operations) {
  
  ReactiveMongoOperationsSessionRepository repository = new ReactiveMongoOperationsSessionRepository(operations);
  if (this.mongoSessionConverter != null) {
    repository.setMongoSessionConverter(this.mongoSessionConverter);
  } else {
    JdkMongoSessionConverter mongoSessionConverter = new JdkMongoSessionConverter(
      new SerializingConverter(),
      new DeserializingConverter(this.classLoader),
      Duration.ofSeconds(ReactiveMongoOperationsSessionRepository.DEFAULT_INACTIVE_INTERVAL));
    repository.setMongoSessionConverter(mongoSessionConverter);
  }
  if (this.maxInactiveIntervalInSeconds != null) {
    repository.setMaxInactiveIntervalInSeconds(this.maxInactiveIntervalInSeconds);
  }
  if (this.collectionName != null) {
    repository.setCollectionName(this.collectionName);
  }
  if (this.mongoOperations != null) {
    repository.setBlockingMongoOperations(this.mongoOperations);
  }
  
  return repository;
}
org.springframework.core.serializer.supportDeserializingConverter

Javadoc

A Converter that delegates to a org.springframework.core.serializer.Deserializerto convert data in a byte array to an object.

Most used methods

  • <init>
    Create a DeserializingConverter that delegates to the provided Deserializer.
  • convert

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now