/** * Deserialize a channel serialized by {@link Channel#serializeChannel()} * * @param file a file which contains the bytes to be deserialized. * @return A Channel that has not been initialized. * @throws IOException * @throws ClassNotFoundException * @throws InvalidArgumentException */ public Channel deSerializeChannel(File file) throws IOException, ClassNotFoundException, InvalidArgumentException { if (null == file) { throw new InvalidArgumentException("File parameter may not be null"); } return deSerializeChannel(Files.readAllBytes(Paths.get(file.getAbsolutePath()))); }
/** * Deserialize a channel serialized by {@link Channel#serializeChannel()} * * @param file a file which contains the bytes to be deserialized. * @return A Channel that has not been initialized. * @throws IOException * @throws ClassNotFoundException * @throws InvalidArgumentException */ public Channel deSerializeChannel(File file) throws IOException, ClassNotFoundException, InvalidArgumentException { if (null == file) { throw new InvalidArgumentException("File parameter may not be null"); } return deSerializeChannel(Files.readAllBytes(Paths.get(file.getAbsolutePath()))); }
/** * Deserialize a channel serialized by {@link Channel#serializeChannel()} * * @param file a file which contains the bytes to be deserialized. * @return A Channel that has not been initialized. * @throws IOException * @throws ClassNotFoundException * @throws InvalidArgumentException */ public Channel deSerializeChannel(File file) throws IOException, ClassNotFoundException, InvalidArgumentException { if (null == file) { throw new InvalidArgumentException("File parameter may not be null"); } return deSerializeChannel(Files.readAllBytes(Paths.get(file.getAbsolutePath()))); }