diff --git a/.idea/libraries/Gradle__com_esotericsoftware_kryo_5_0_0_RC1.xml b/.idea/libraries/Gradle__com_esotericsoftware_kryo_5_0_0_RC1.xml new file mode 100644 index 0000000..c4c5374 --- /dev/null +++ b/.idea/libraries/Gradle__com_esotericsoftware_kryo_5_0_0_RC1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_esotericsoftware_minlog_1_3_0.xml b/.idea/libraries/Gradle__com_esotericsoftware_minlog_1_3_0.xml new file mode 100644 index 0000000..21b1790 --- /dev/null +++ b/.idea/libraries/Gradle__com_esotericsoftware_minlog_1_3_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_esotericsoftware_reflectasm_1_11_7.xml b/.idea/libraries/Gradle__com_esotericsoftware_reflectasm_1_11_7.xml new file mode 100644 index 0000000..5b8849a --- /dev/null +++ b/.idea/libraries/Gradle__com_esotericsoftware_reflectasm_1_11_7.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_annotations_2_13_2.xml b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_annotations_2_13_2.xml new file mode 100644 index 0000000..0748cf1 --- /dev/null +++ b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_annotations_2_13_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_13_2.xml b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_13_2.xml new file mode 100644 index 0000000..f43d7cf --- /dev/null +++ b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_13_2.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_databind_2_13_2_2.xml b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_databind_2_13_2_2.xml new file mode 100644 index 0000000..f01ae03 --- /dev/null +++ b/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_databind_2_13_2_2.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_9.xml b/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_9.xml new file mode 100644 index 0000000..4c0173f --- /dev/null +++ b/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_9.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_2.xml b/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_2.xml new file mode 100644 index 0000000..723874b --- /dev/null +++ b/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_annotations_22_0_0.xml b/.idea/libraries/Gradle__org_jetbrains_annotations_22_0_0.xml new file mode 100644 index 0000000..892ffec --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_annotations_22_0_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_8_2.xml b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_8_2.xml new file mode 100644 index 0000000..1357007 --- /dev/null +++ b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_8_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_8_2.xml b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_8_2.xml new file mode 100644 index 0000000..575d95d --- /dev/null +++ b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_8_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_8_2.xml b/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_8_2.xml new file mode 100644 index 0000000..7a28900 --- /dev/null +++ b/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_8_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_8_2.xml b/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_8_2.xml new file mode 100644 index 0000000..8e9823c --- /dev/null +++ b/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_8_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_objenesis_objenesis_2_6.xml b/.idea/libraries/Gradle__org_objenesis_objenesis_2_6.xml new file mode 100644 index 0000000..6a32f4f --- /dev/null +++ b/.idea/libraries/Gradle__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml b/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml new file mode 100644 index 0000000..6cdf140 --- /dev/null +++ b/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/opack.main.iml b/.idea/modules/opack.main.iml index 23992e9..6808ad1 100644 --- a/.idea/modules/opack.main.iml +++ b/.idea/modules/opack.main.iml @@ -1,5 +1,5 @@ - + diff --git a/.idea/modules/opack.test.iml b/.idea/modules/opack.test.iml index bea66ce..c779dc3 100644 --- a/.idea/modules/opack.test.iml +++ b/.idea/modules/opack.test.iml @@ -1,5 +1,5 @@ - + diff --git a/.idea/opack.iml b/.idea/opack.iml index 86c52ec..d96b1aa 100644 --- a/.idea/opack.iml +++ b/.idea/opack.iml @@ -1,5 +1,5 @@ - + diff --git a/README.md b/README.md index cd302c2..d9888c0 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Gradle: ```gradle dependencies { - implementation 'com.realtimetech:opack:0.0.9' + implementation 'com.realtimetech:opack:0.0.12' } ``` @@ -58,7 +58,7 @@ Maven: com.realtimetech opack - 0.0.9 + 0.0.12 ``` @@ -116,13 +116,13 @@ public class Usage { .create(); - OpackValue opackValue = /* See Serialize Usage */; + OpackValue opackValue; // Encode Basic String json = jsonCodec.encode(opackValue); // Encode with Java IO Writer - Writer writer = /* Java IO Writer */; + Writer writer; jsonCodec.encode(writer, opackValue); // Decode Basic @@ -144,13 +144,13 @@ public class Usage { .create(); - OpackValue opackValue = /* See Serialize Usage */; + OpackValue opackValue; // Encode Basic byte[] bytes = denseCodec.encode(opackValue); // Encode with Java IO OutputStream - OutputStream outputStream = /* Java IO OutputStream */; + OutputStream outputStream; denseCodec.encode(OutputStreamWriter.of(outputStream), opackValue); // Encode with ByteArrayWriter @@ -162,7 +162,7 @@ public class Usage { OpackValue decodedOpackValue = denseCodec.decode(bytes); // Decode with Java IO InputStream - InputStream inputStream = /* Java IO InputStream */; + InputStream inputStream; OpackValue decodedOpackValue = denseCodec.decode(InputStreamReader.of(inputStream)); // Decode with ByteArrayReader diff --git a/build.gradle b/build.gradle index 2cd9ec1..a078d46 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ plugins { group 'com.realtimetech' archivesBaseName = "opack" -version = "0.0.11" +version = "0.0.12" compileJava.options.encoding = 'UTF-8' diff --git a/src/main/java/com/realtimetech/opack/codec/dense/reader/InputStreamReader.java b/src/main/java/com/realtimetech/opack/codec/dense/reader/InputStreamReader.java index 5dcb2b8..aceb752 100644 --- a/src/main/java/com/realtimetech/opack/codec/dense/reader/InputStreamReader.java +++ b/src/main/java/com/realtimetech/opack/codec/dense/reader/InputStreamReader.java @@ -32,6 +32,7 @@ public class InputStreamReader implements Reader { * Create InputStreamReader * * @param inputStream the input stream + * @return the input stream reader */ public static @NotNull InputStreamReader of(@NotNull InputStream inputStream) { return new InputStreamReader(inputStream); diff --git a/src/main/java/com/realtimetech/opack/codec/dense/writer/OutputStreamWriter.java b/src/main/java/com/realtimetech/opack/codec/dense/writer/OutputStreamWriter.java index 3e3cb0b..174486d 100644 --- a/src/main/java/com/realtimetech/opack/codec/dense/writer/OutputStreamWriter.java +++ b/src/main/java/com/realtimetech/opack/codec/dense/writer/OutputStreamWriter.java @@ -32,6 +32,7 @@ public class OutputStreamWriter implements Writer { * Create OutputStreamWriter * * @param outputStream the output stream + * @return the output stream writer */ public static @NotNull OutputStreamWriter of(@NotNull OutputStream outputStream) { return new OutputStreamWriter(outputStream); diff --git a/src/main/java/com/realtimetech/opack/util/structure/FastStack.java b/src/main/java/com/realtimetech/opack/util/structure/FastStack.java index 35e19ff..0341ac1 100644 --- a/src/main/java/com/realtimetech/opack/util/structure/FastStack.java +++ b/src/main/java/com/realtimetech/opack/util/structure/FastStack.java @@ -167,6 +167,8 @@ public T pop() { /** * Remove amount elements. + * + * @param amount the amount to remove elements */ public void remove(int amount) { if (this.currentIndex <= amount)