daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ru.hse.kuzyaka.trie;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5. import java.io.OutputStream;
  6.  
  7. /**
  8.  * Interface provides to work with specific data (send it or get it) in a similiar way as with bytestreams.
  9.  * More specifically, it has two methods -- {@code deserialize(InputStream)} and {@code serialize(OutputStream)} which are used
  10.  * to send and receive data. Any class implementing this interface must provide an implementation for both methods.
  11.  * Note that if working with streams goes wrong, an {@code IOException} is thrown.
  12.  */
  13. public interface Serializable {
  14.     /**
  15.      * Writes this object as a byte sequence
  16.      *
  17.      * @param out <code>OutputStream</code> to write trie to
  18.      * @throws IOException
  19.      */
  20.     void serialize(OutputStream out) throws IOException;
  21.  
  22.     /**
  23.      * Reads an object from the given <code>InputStream</code>. Any data which the object contained earlier, is discarded.
  24.      *
  25.      * @param in <code>InputStream</code> to read from
  26.      * @throws IOException
  27.      */
  28.     void deserialize(InputStream in) throws IOException;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top