@Override public byte[] read() throws IOException { Closer closer = Closer.create(); try { FileInputStream in = closer.register(openStream()); return readFile(in, in.getChannel().size()); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } }
@Override public byte[] read() throws IOException { try (SeekableByteChannel channel = Files.newByteChannel(path, options)) { return org.apache.hbase.thirdparty.com.google.common.io.Files.readFile( Channels.newInputStream(channel), channel.size()); } }