org.infinispan.marshall.exts.UuidExternalizer Maven / Gradle / Ivy
package org.infinispan.marshall.exts;
import org.infinispan.commons.marshall.AbstractExternalizer;
import org.infinispan.commons.marshall.MarshallUtil;
import org.infinispan.marshall.core.Ids;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.Set;
import java.util.UUID;
public final class UuidExternalizer extends AbstractExternalizer {
@Override
public Set> getTypeClasses() {
return Collections.>singleton(UUID.class);
}
@Override
public Integer getId() {
return Ids.UUID;
}
@Override
public void writeObject(ObjectOutput output, UUID object) throws IOException {
MarshallUtil.marshallUUID(object, output, false);
}
@Override
public UUID readObject(ObjectInput input) throws IOException {
return MarshallUtil.unmarshallUUID(input, false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy