mod-dev-talk Wednesday 29 December 2021

13 messages2 people

  1. gudenau

    @Azzyypaaras
    @Override
    public ByteBuffer encode() {
        int size = 0;
        var values = value();
        byte[][] data = new byte[values.size()][];
        for(int i = 0, valuesSize = values.size(); i < valuesSize; i++){
            String value = values.get(i);
            var datum = value.getBytes(StandardCharsets.UTF_8);
            size += (data[i] = Arrays.copyOf(datum, datum.length + 1)).length;
        }
        ByteBuffer buffer = ByteBuffer.allocate(size);
        for(var datum : data) {
            buffer.put(datum);
        }
        return buffer.position(0);
    }
  2. gudenau

    Nope.
  3. AzzyypaarasTeam

    normal networking?
  4. AzzyypaarasTeam

    Replying togudenauWhat is wrong with datum?

    Oh nothing, just don't hear it very oftem
  5. gudenau

    Gotcha.
  6. gudenau

    It's the modern way of telling software about the hardware it runs on, mostly for bootloaders and kernels and such.
  7. AzzyypaarasTeam

    oo