List of usage examples for org.apache.hadoop.hdfs.security.token.block BlockKey write
@Override public void write(DataOutput out) throws IOException
From source file:io.hops.metadata.HdfsVariables.java
License:Apache License
private static ByteArrayVariable serializeBlockKey(BlockKey key, Variable.Finder keyType) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(os); key.write(dos); dos.flush();/*w ww . ja v a 2s . c o m*/ return new ByteArrayVariable(keyType, os.toByteArray()); }