Renamed "user-defined types" as "structs" in the serialisation format.

This commit is contained in:
akwizgran
2011-12-02 11:36:45 +00:00
parent 2fb797a197
commit f7360cddde
33 changed files with 141 additions and 139 deletions

View File

@@ -1,6 +1,6 @@
package net.sf.briar.api.protocol;
/** User-defined type identifiers for encoding and decoding protocol objects. */
/** Struct identifiers for encoding and decoding protocol objects. */
public interface Types {
static final int ACK = 0;

View File

@@ -69,7 +69,7 @@ public interface Reader {
boolean hasNull() throws IOException;
void readNull() throws IOException;
boolean hasUserDefined(int id) throws IOException;
<T> T readUserDefined(int id, Class<T> t) throws IOException;
void readUserDefinedId(int id) throws IOException;
boolean hasStruct(int id) throws IOException;
<T> T readStruct(int id, Class<T> t) throws IOException;
void readStructId(int id) throws IOException;
}

View File

@@ -8,5 +8,5 @@ public interface SerialComponent {
int getSerialisedUniqueIdLength(int id);
int getSerialisedUserDefinedIdLength(int id);
int getSerialisedStructIdLength(int id);
}

View File

@@ -34,5 +34,5 @@ public interface Writer {
void writeNull() throws IOException;
void writeUserDefinedId(int tag) throws IOException;
void writeStructId(int id) throws IOException;
}