Package krati.io

Examples of krati.io.SerializationException


               
                Clock clock = _clockSerializer.deserialize(clockBytes);
               
                Event<T> event = new SimpleEvent<T>(value, clock);
                if(!batch.put(event)) {
                    throw new SerializationException("Invalid clocks:" + " clock=" + clock + " minClock=" + header.getMinClock() + " maxClock=" + header.getMaxClock());
                }
            }
           
            return batch;
        } catch(SerializationException e) {
            throw e;
        } catch(Exception e) {
            throw new SerializationException("Failed to deserialize", e);
        }
    }
View Full Code Here


           
            return baos.toByteArray();
        } catch(SerializationException e) {
            throw e;
        } catch(Exception e) {
            throw new SerializationException("Failed to serialize", e);
        }
    }
View Full Code Here

        ByteBuffer bb = ByteBuffer.wrap(bytes);
       
        // Version
        int version = bb.getInt();
        if(version < 0) {
            throw new SerializationException("Invalid version: " + version);
        }
       
        // Size
        int size = bb.getInt();
        if(size < 0) {
            throw new SerializationException("Invalid size: " + size);
        }
       
        // Origin
        long origin = bb.getLong();
       
View Full Code Here

            datumWriter.write(record, encoder);
            encoder.flush();
           
            return out.toByteArray();
        } catch(Exception e) {
            throw new SerializationException("Failed to serialize", e);
        }
    }
View Full Code Here

           
            datumReader.read(record, resolvingDecoder);
           
            return record;
        } catch(Exception e) {
            throw new SerializationException("Failed to deserialize", e);
        }
    }
View Full Code Here

            datumWriter.write(record, encoder);
            encoder.flush();
           
            return out.toByteArray();
        } catch(Exception e) {
            throw new SerializationException("Failed to serialize", e);
        }
    }
View Full Code Here

           
            datumReader.read(record, decoder);
           
            return record;
        } catch(Exception e) {
            throw new SerializationException("Failed to deserialize", e);
        }
    }
View Full Code Here

        try {
            ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
            ObjectInputStream ois = new ObjectInputStream(bais);
            return (T)ois.readObject();
        } catch(Exception e) {
            throw new SerializationException("Failed to deserialize bytes", e);
        }
    }
View Full Code Here

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(object);
            return baos.toByteArray();
        } catch(Exception e) {
            throw new SerializationException("Failed to serialize object", e);
        }
    }
View Full Code Here

TOP

Related Classes of krati.io.SerializationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.