private static void writeVersion(Version version, DataOutputStream out, Map<Object, Integer> objectTable) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } Integer index = objectTable.get(version); if (index != null) { out.writeByte(INDEX); out.writeInt(index); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out, objectTable); }
private static void writeVersion(Version version, DataOutputStream out, Map<Object, Integer> objectTable) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } Integer index = objectTable.get(version); if (index != null) { out.writeByte(INDEX); out.writeInt(index); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out, objectTable); }
private static void writeVersion(Version version, DataOutputStream out, Map<Object, Integer> objectTable) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } Integer index = objectTable.get(version); if (index != null) { out.writeByte(INDEX); out.writeInt(index); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out, objectTable); }
private static void writeVersion(Version version, DataOutputStream out, Map<Object, Integer> objectTable) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } Integer index = objectTable.get(version); if (index != null) { out.writeByte(INDEX); out.writeInt(index); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out, objectTable); }
private static void writeVersion(Version version, DataOutputStream out) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out); }
private static void writeVersion(Version version, DataOutputStream out) throws IOException { if (version == null || version.equals(Version.emptyVersion)) { out.writeByte(NULL); return; } out.writeByte(OBJECT); out.writeInt(version.getMajor()); out.writeInt(version.getMinor()); out.writeInt(version.getMicro()); writeQualifier(version.getQualifier(), out); }