@Test public void serialize() throws Exception { Definitions instance = new Definitions(); instance.addTag(1, "one", "", "", 0, 0); byte serial[] = instance.serialize(); Definitions instance2 = Definitions.deserialize(serial); assertEquals(instance.getTags().size(), instance2.getTags().size()); assertEquals(instance.getSymbols().size(), instance2.getSymbols().size()); }
public byte[] serialize() throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(this); return bytes.toByteArray(); }
Definitions implements Serializable { public byte[] serialize() throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(this); return bytes.toByteArray(); } }
Definitions implements Serializable { public byte[] serialize() throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(this); return bytes.toByteArray(); } Definitions(); }
Definitions implements Serializable { public byte[] serialize() throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(this); return bytes.toByteArray(); } Definitions(); void resetUnused(); Set<String> getSymbols(); boolean hasSymbol(String symbol); boolean hasDefinitionAt(String symbol, int lineNumber, String[] strs); int occurrences(String symbol); int numberOfSymbols(); List<Tag> getTags(); List<Tag> getTags(int line); void addTag(int line, String symbol, String type, String text,
            int lineStart, int lineEnd); void addTag(int line, String symbol, String type, String text,
            String namespace, String signature, int lineStart, int lineEnd); byte[] serialize(); static Definitions deserialize(byte[] bytes); }
Definitions implements Serializable { public byte[] serialize() throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); new ObjectOutputStream(bytes).writeObject(this); return bytes.toByteArray(); } Definitions(); void resetUnused(); Set<String> getSymbols(); boolean hasSymbol(String symbol); boolean hasDefinitionAt(String symbol, int lineNumber, String[] strs); int occurrences(String symbol); int numberOfSymbols(); List<Tag> getTags(); List<Tag> getTags(int line); void addTag(int line, String symbol, String type, String text,
            int lineStart, int lineEnd); void addTag(int line, String symbol, String type, String text,
            String namespace, String signature, int lineStart, int lineEnd); byte[] serialize(); static Definitions deserialize(byte[] bytes);  }