@Override public void copy(DataInputView source, DataOutputView target) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (this.copyInstance == null){ this.copyInstance = createInstance(); } T tmp = deserialize(copyInstance, source); serialize(tmp, target); } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
@SuppressWarnings("unchecked") @Override public T deserialize(DataInputView source) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (source != previousIn) { DataInputViewStream inputStream = new DataInputViewStream(source); input = new NoFetchingInput(inputStream); previousIn = source; } try { return (T) kryo.readClassAndObject(input); } catch (KryoException ke) { Throwable cause = ke.getCause(); if (cause instanceof EOFException) { throw (EOFException) cause; } else { throw ke; } } } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (this.copyInstance == null){ this.copyInstance = createInstance(); } T tmp = deserialize(copyInstance, source); serialize(tmp, target); } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (this.copyInstance == null){ this.copyInstance = createInstance(); } T tmp = deserialize(copyInstance, source); serialize(tmp, target); } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
@SuppressWarnings("unchecked") @Override public T deserialize(DataInputView source) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (source != previousIn) { DataInputViewStream inputStream = new DataInputViewStream(source); input = new NoFetchingInput(inputStream); previousIn = source; } try { return (T) kryo.readClassAndObject(input); } catch (KryoException ke) { Throwable cause = ke.getCause(); if (cause instanceof EOFException) { throw (EOFException) cause; } else { throw ke; } } } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }
@SuppressWarnings("unchecked") @Override public T deserialize(DataInputView source) throws IOException { if (CONCURRENT_ACCESS_CHECK) { enterExclusiveThread(); } try { checkKryoInitialized(); if (source != previousIn) { DataInputViewStream inputStream = new DataInputViewStream(source); input = new NoFetchingInput(inputStream); previousIn = source; } try { return (T) kryo.readClassAndObject(input); } catch (KryoException ke) { Throwable cause = ke.getCause(); if (cause instanceof EOFException) { throw (EOFException) cause; } else { throw ke; } } } finally { if (CONCURRENT_ACCESS_CHECK) { exitExclusiveThread(); } } }