All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commons.marshall.jboss.JBossExternalizerAdapter Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.commons.marshall.jboss;

import org.infinispan.commons.marshall.Externalizer;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public class JBossExternalizerAdapter implements org.jboss.marshalling.Externalizer {
   private static final long serialVersionUID = 8187679200599686076L;

   final Externalizer externalizer;

   public JBossExternalizerAdapter(Externalizer externalizer) {
      this.externalizer = externalizer;
   }

   @Override
   public void writeExternal(Object subject, ObjectOutput output) throws IOException {
      externalizer.writeObject(output, subject);
   }

   @Override
   public Object createExternal(Class targetClass, ObjectInput input) throws IOException, ClassNotFoundException {
      return externalizer.readObject(input);
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy