List of usage examples for org.apache.commons.lang SerializationUtils deserialize
public static Object deserialize(byte[] objectData)
Deserializes a single Object
from an array of bytes.
From source file:lpp.rabbitmq.original.QueueConsumer.java
public void handleDelivery(String arg0, Envelope arg1, com.rabbitmq.client.AMQP.BasicProperties arg2, byte[] arg3) throws IOException { OMessage msg = (OMessage) SerializationUtils.deserialize(arg3); System.out.println(msg.toString()); }
From source file:fr.inria.oak.paxquery.pact.operators.binary.DisjLNOEquiJoinOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.nullRecord = RecordOperations.createNullRecord(this.inputRecordsSignature2); String predEncoded = parameters.getString(PACTOperatorsConfiguration.PRED_BINARY.toString(), null); byte[] predBytes = DatatypeConverter.parseBase64Binary(predEncoded); this.pred = (DisjunctivePredicate) SerializationUtils.deserialize(predBytes); this.predNumber = parameters.getInteger(PACTOperatorsConfiguration.PRED_INT.toString(), -1); }
From source file:fr.inria.oak.paxquery.pact.operators.unary.FlattenOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); String unnestPathEncoded = parameters.getString(PACTOperatorsConfiguration.UNNEST_PATH_BINARY.toString(), null);/*from www. j a v a2s . c om*/ byte[] unnestPathBytes = DatatypeConverter.parseBase64Binary(unnestPathEncoded); final int[] unnestPath = (int[]) SerializationUtils.deserialize(unnestPathBytes); this.unnestPath = unnestPath; }
From source file:dfki.sb.rabbitmqjava.RabbitMQObjectStreamClient.java
private QuoteRequest sendQuoteRequest(QuoteRequest quoteObject) throws IOException, InterruptedException { QuoteRequest response = null;/* w w w. ja v a2s .c om*/ String corrId = UUID.randomUUID().toString(); BasicProperties props = new BasicProperties.Builder().correlationId(corrId).replyTo(replyQueueName).build(); channel.basicPublish("", requestQueueName, props, SerializationUtils.serialize(quoteObject)); while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(); if (delivery.getProperties().getCorrelationId().equals(corrId)) { response = (QuoteRequest) SerializationUtils.deserialize(delivery.getBody()); break; } } return response; }
From source file:fr.inria.oak.paxquery.pact.operators.binary.DisjEquiJoinOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); String predEncoded = parameters.getString(PACTOperatorsConfiguration.PRED_BINARY.toString(), null); byte[] predBytes = DatatypeConverter.parseBase64Binary(predEncoded); this.pred = (DisjunctivePredicate) SerializationUtils.deserialize(predBytes); this.predNumber = parameters.getInteger(PACTOperatorsConfiguration.PRED_INT.toString(), -1); }
From source file:fr.inria.oak.paxquery.pact.operators.unary.PostLNOJoinWithAggregationOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.combinationColumn = parameters.getInteger(PACTOperatorsConfiguration.COMBINATION_COLUMN_INT.toString(), -1);/*from w w w . ja va2 s . co m*/ String aggregationTypeEncoded = parameters .getString(PACTOperatorsConfiguration.AGGREGATION_TYPE_BINARY.toString(), null); byte[] aggregationTypeBytes = DatatypeConverter.parseBase64Binary(aggregationTypeEncoded); final AggregationType aggregationType = (AggregationType) SerializationUtils .deserialize(aggregationTypeBytes); this.aggregationType = aggregationType; this.excludeNestedField = parameters .getBoolean(PACTOperatorsConfiguration.EXCLUDE_NESTED_FIELD_BOOLEAN.toString(), false); }
From source file:fr.inria.oak.paxquery.pact.operators.binary.ConjLNOEquiJoinWithAggregationOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.aggregationColumn = parameters.getInteger(PACTOperatorsConfiguration.AGGREGATION_COLUMN_INT.toString(), -1);// w w w. j ava 2s . c o m String aggregationTypeEncoded = parameters .getString(PACTOperatorsConfiguration.AGGREGATION_TYPE_BINARY.toString(), null); byte[] aggregationTypeBytes = DatatypeConverter.parseBase64Binary(aggregationTypeEncoded); final AggregationType aggregationType = (AggregationType) SerializationUtils .deserialize(aggregationTypeBytes); this.aggregationType = aggregationType; this.excludeNestedField = parameters .getBoolean(PACTOperatorsConfiguration.EXCLUDE_NESTED_FIELD_BOOLEAN.toString(), false); }
From source file:de.cosmocode.palava.cache.keysets.MemoryKeySet.java
@Override public void initialize() throws LifecycleException { // attempt to read list from hard disk try {/*from w ww .ja v a2s.co m*/ final File serializationFile = getSerializationFile(); if (serializationFile.exists()) { final Object deserialized = SerializationUtils .deserialize(Files.newInputStreamSupplier(serializationFile).getInput()); @SuppressWarnings("unchecked") final Collection<String> deserializedKeys = (Collection<String>) deserialized; keys.addAll(deserializedKeys); LOG.info("Loaded {} keys from hard disk", keys.size()); } } catch (IOException e) { throw new LifecycleException(e); } }
From source file:fr.inria.oak.paxquery.pact.operators.unary.GroupByWithAggregationOperator.java
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.aggregationColumn = parameters.getInteger(PACTOperatorsConfiguration.AGGREGATION_COLUMN_INT.toString(), -1);// ww w .j av a2s. co m String aggregationTypeEncoded = parameters .getString(PACTOperatorsConfiguration.AGGREGATION_TYPE_BINARY.toString(), null); byte[] aggregationTypeBytes = DatatypeConverter.parseBase64Binary(aggregationTypeEncoded); final AggregationType aggregationType = (AggregationType) SerializationUtils .deserialize(aggregationTypeBytes); this.aggregationType = aggregationType; this.excludeNestedField = parameters .getBoolean(PACTOperatorsConfiguration.EXCLUDE_NESTED_FIELD_BOOLEAN.toString(), false); this.attachDummyColumn = parameters .getBoolean(PACTOperatorsConfiguration.ATTACH_DUMMY_COLUMN_BOOLEAN.toString(), false); }
From source file:mitm.application.djigzo.mail.MailSerializer.java
/** * Deserializes the Mail object. // w w w .j a va2 s . co m * * Note: the MimeMessage is not deserialized */ public Mail deserialize(byte[] serialized) { if (serialized == null) { return null; } return ((MailContainer) SerializationUtils.deserialize(serialized)).getMail(); }