# Where are ByteUtilities gone?

**URL:** <https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020>\
**Category:** Module Development\
**Created:** [December 30, 2025, 10:38am UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020 "2025-12-30T10:38:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [December 30, 2025, 10:38am UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/1 "2025-12-30T10:38:20Z")

</div>

I am searching for the 8.3 replacement for com.inductiveautomation.xopc.driver.util.ByteUtilities. It is mentioned in the 8.3 [programmer's guide](https://www.sdk-docs.inductiveautomation.com/docs/8.3/appendix/useful-utility-classes#driver-api) but there is no xopc package in the 8.3 api. Has this class been moved somewhere else or is it completely gone?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2025, 1:25pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/2 "2025-12-30T13:25:48Z")

</div>

Everything in the xopc packages was finally made private in 8.3, and it looks like perhaps the one legitimate utility class got caught up in that as well.

Consider [GitHub - digitalpetri/byteops: Utility functions for getting values from and setting values into collections of bytes, taking into account byte order and word order.](https://github.com/digitalpetri/byteops) instead? 🤷

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 30, 2025, 1:50pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/3 "2025-12-30T13:50:29Z")

</div>

Hmmm. Could have used that several years ago.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2025, 1:53pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/4 "2025-12-30T13:53:53Z")

</div>

Yeah, I only put that together somewhat recently. I had also started an effort to migrate the many byte utils in Ignition drivers but it fell apart somewhere.

One thing I'm still bothered about is the boxing problem. I opted for primitive types on the getters in that `byteops` library, and accepting both in the setters.

But there's a lot of existing code that wants boxed array values created. Lots of tests expecting one or the other. Milo Variant should handle both... but they're not equivalent everywhere you want them to be.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 30, 2025, 2:00pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/5 "2025-12-30T14:00:43Z")

</div>

> [@Kevin.Herron](#):
>
> I opted for primitive types on the getters in that `byteops` library, and accepting both in the setters.

I would do the same, with nulls treated as a "skip" in the setters.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2025, 2:09pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/6 "2025-12-30T14:09:06Z")

</div>

It's not a very satisfying design, which is why I think I didn't do it and then stopped the whole effort, but I should probably just introduce `BoxedByteOps` interface and then be done with it.

```java
public interface BoxedByteOps<T> extends ByteOps<T> {

  /**
   * Get the Byte array at the given {@code index} in {@code bytes}.
   *
   * @param bytes the bytes to get the value from.
   * @param index the index into {@code bytes} to get the value at.
   * @param length the length of the array.
   * @return the Byte array at the given {@code index}.
   */
  Byte[] getBoxedByteArray(T bytes, int index, int length);

  /**
   * Set the Byte array at the given {@code index} in {@code bytes}.
   *
   * @param bytes the bytes to set the values in.
   * @param index the index into {@code bytes} to set the values at.
   * @param values the Byte array to set.
   */
  void setBoxedByteArray(T bytes, int index, Byte[] values);

  // etc...
}

```

That, plus a `byteops-milo` module similar to the `byteops-unsigned` but for Milo unsigned types... probably 1.0.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 30, 2025, 2:34pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/7 "2025-12-30T14:34:28Z")

</div>

> [@Kevin.Herron](#):
>
> introduce `BoxedByteOps` interface

Ewwww!

I'm very much not a fan of arrays of boxed primitives.

If you really need it, consider making `Byte[]` a supported underlying storage for "bytes". Perhaps with a non-null constraint, so you can keep the primitive getters.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2025, 2:46pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/8 "2025-12-30T14:46:42Z")

</div>

I'm actually just adding a pile of `getBoxed*` and `setBoxed*` methods to the main `ByteOps` interface. Use them, or don't. They're optional, but there if you have code that is already using boxed arrays.

Everything is implied to be non-null right now, but I'm also adding a `package-info.java` with `@NullMarked` so static analysis can enforce it. [Nullness User Guide | JSpecify](https://jspecify.dev/docs/user-guide/#nullmarked)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2025, 9:03pm UTC](https://forum.inductiveautomation.com/t/where-are-byteutilities-gone/113020/9 "2025-12-30T21:03:10Z")

</div>

[Released version 0.2.1](https://github.com/digitalpetri/byteops/releases/tag/v0.2.1) with much of what was discussed/mention here.
