Skip to content
Snippets Groups Projects
Commit fdcc3512 authored by tedyu's avatar tedyu Committed by Cheng Lian
Browse files

[SPARK-12934] use try-with-resources for streams

liancheng please take a look

Author: tedyu <yuzhihong@gmail.com>

Closes #10906 from tedyu/master.
parent 109061f7
No related branches found
No related tags found
No related merge requests found
......@@ -128,11 +128,13 @@ abstract public class CountMinSketch {
/**
* Writes out this {@link CountMinSketch} to an output stream in binary format.
* It is the caller's responsibility to close the stream
*/
public abstract void writeTo(OutputStream out) throws IOException;
/**
* Reads in a {@link CountMinSketch} from an input stream.
* It is the caller's responsibility to close the stream
*/
public static CountMinSketch readFrom(InputStream in) throws IOException {
return CountMinSketchImpl.readFrom(in);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment