/** * Writes a {@code TAG_Int_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntArrayTagPayload(IntArrayTag tag) throws IOException { int[] ints = tag.getValue(); os.writeInt(ints.length); for (int i = 0; i < ints.length; i++) { os.writeInt(ints[i]); } }
/** * Writes a {@code TAG_Int_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntArrayTagPayload(IntArrayTag tag) throws IOException { int[] ints = tag.getValue(); os.writeInt(ints.length); for (int i = 0; i < ints.length; i++) { os.writeInt(ints[i]); } }
/** * Writes a {@code TAG_Int_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntArrayTagPayload(IntArrayTag tag) throws IOException { int[] ints = tag.getValue(); os.writeInt(ints.length); for (int i = 0; i < ints.length; i++) { os.writeInt(ints[i]); } }
/** * Writes a {@code TAG_Int} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntTagPayload(IntTag tag) throws IOException { os.writeInt(tag.getValue()); }
/** * Writes a {@code TAG_Int} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntTagPayload(IntTag tag) throws IOException { os.writeInt(tag.getValue()); }
/** * Writes a {@code TAG_Int} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeIntTagPayload(IntTag tag) throws IOException { os.writeInt(tag.getValue()); }
/** * Writes a {@code TAG_Short_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeShortArrayTagPayload(ShortArrayTag tag) throws IOException { short[] shorts = tag.getValue(); os.writeInt(shorts.length); for (int i = 0; i < shorts.length; i++) { os.writeShort(shorts[i]); } }
/** * Writes a {@code TAG_Byte_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeByteArrayTagPayload(ByteArrayTag tag) throws IOException { byte[] bytes = tag.getValue(); os.writeInt(bytes.length); os.write(bytes); }
/** * Writes a {@code TAG_Short_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeShortArrayTagPayload(ShortArrayTag tag) throws IOException { short[] shorts = tag.getValue(); os.writeInt(shorts.length); for (int i = 0; i < shorts.length; i++) { os.writeShort(shorts[i]); } }
/** * Writes a {@code TAG_Byte_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeByteArrayTagPayload(ByteArrayTag tag) throws IOException { byte[] bytes = tag.getValue(); os.writeInt(bytes.length); os.write(bytes); }
/** * Writes a {@code TAG_Byte_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeByteArrayTagPayload(ByteArrayTag tag) throws IOException { byte[] bytes = tag.getValue(); os.writeInt(bytes.length); os.write(bytes); }
/** * Writes a {@code TAG_Short_Array} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ private void writeShortArrayTagPayload(ShortArrayTag tag) throws IOException { short[] shorts = tag.getValue(); os.writeInt(shorts.length); for (int i = 0; i < shorts.length; i++) { os.writeShort(shorts[i]); } }
/** * Writes a {@code TAG_List} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ @SuppressWarnings ("unchecked") private void writeListTagPayload(ListTag<?> tag) throws IOException { Class<? extends Tag<?>> clazz = tag.getElementType(); List<Tag<?>> tags = (List<Tag<?>>) tag.getValue(); int size = tags.size(); os.writeByte(TagType.getByTagClass(clazz).getId()); os.writeInt(size); for (Tag<?> tag1 : tags) { writeTagPayload(tag1); } }
/** * Writes a {@code TAG_List} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ @SuppressWarnings ("unchecked") private void writeListTagPayload(ListTag<?> tag) throws IOException { Class<? extends Tag<?>> clazz = tag.getElementType(); List<Tag<?>> tags = (List<Tag<?>>) tag.getValue(); int size = tags.size(); os.writeByte(TagType.getByTagClass(clazz).getId()); os.writeInt(size); for (Tag<?> tag1 : tags) { writeTagPayload(tag1); } }
/** * Writes a {@code TAG_List} tag. * * @param tag The tag. * @throws java.io.IOException if an I/O error occurs. */ @SuppressWarnings ("unchecked") private void writeListTagPayload(ListTag<?> tag) throws IOException { Class<? extends Tag<?>> clazz = tag.getElementType(); List<Tag<?>> tags = (List<Tag<?>>) tag.getValue(); int size = tags.size(); os.writeByte(TagType.getByTagClass(clazz).getId()); os.writeInt(size); for (Tag<?> tag1 : tags) { writeTagPayload(tag1); } }