List of usage examples for org.apache.hadoop.io.serializer Serializer Serializer
Serializer
From source file:org.apache.gora.mapreduce.StringSerialization.java
License:Apache License
@Override public Serializer<String> getSerializer(Class<String> c) { return new Serializer<String>() { private DataOutputStream out; @Override/* ww w.j a v a2 s . c om*/ public void close() throws IOException { this.out.close(); } @Override public void open(OutputStream out) throws IOException { this.out = new DataOutputStream(out); } @Override public void serialize(String str) throws IOException { Text.writeString(out, str); } }; }