diff --git a/pom.xml b/pom.xml
index 518498b..ec3dd08 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,11 @@
- 21
+
+ 8
UTF-8
5.10.2
@@ -41,6 +45,17 @@
org.apache.maven.plugins
maven-compiler-plugin
3.13.0
+
+
+
+ default-testCompile
+
+ 17
+
+
+
org.apache.maven.plugins
diff --git a/src/main/java/com/swancommunity/owid/Io.java b/src/main/java/com/swancommunity/owid/Io.java
index 9d0af1d..17de59d 100644
--- a/src/main/java/com/swancommunity/owid/Io.java
+++ b/src/main/java/com/swancommunity/owid/Io.java
@@ -175,7 +175,7 @@ static void writeString(ByteArrayOutputStream buffer, String value)
throw new OwidException("domain '" + value + "' is not valid");
}
}
- buffer.writeBytes(bytes);
+ buffer.write(bytes, 0, bytes.length);
buffer.write(0);
}
@@ -198,7 +198,7 @@ static void writeByteArray(ByteArrayOutputStream buffer, byte[] value)
+ "' exceeds the unsigned 32 bit limit");
}
writeUInt32(buffer, value.length);
- buffer.writeBytes(value);
+ buffer.write(value, 0, value.length);
}
/** Writes the fixed length signature, validating the length. */
@@ -207,7 +207,7 @@ static void writeSignature(ByteArrayOutputStream buffer, byte[] value)
if (value.length != Owid.SIGNATURE_LENGTH) {
throw invalidSignatureLength(value.length);
}
- buffer.writeBytes(value);
+ buffer.write(value, 0, value.length);
}
/** Writes the date using the encoding associated with the version. */