Java Byte Array Value Set setByte(byte[] byteArray, int offset, byte b)

Here you can find the source of setByte(byte[] byteArray, int offset, byte b)

Description

This method sets a byte in a byte array at a certain offset in the byte array.

License

Open Source License

Return

The byte array.

Declaration

public static byte[] setByte(byte[] byteArray, int offset, byte b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  w  w w.j a  v a2s  .  c  o m
     * This method sets a byte in a byte array at a certain offset
     * in the byte array.
     * @return The byte array.
     */
    public static byte[] setByte(byte[] byteArray, int offset, byte b) {
        byteArray[offset] = b;
        return byteArray;
    }
}

Related

  1. setbyte(byte dest[], int offset, byte b)
  2. setByte(byte value, byte[] bytes, int offset)
  3. setByte(byte[] buffer, int index, int val)
  4. setbytes(byte dest[], int offset, byte src[])
  5. setBytes(byte[] destination, int offset, byte[] source)
  6. setBytes(byte[] setTo, int startTo, byte[] setFrom, int startFrom, int len)
  7. setBytes(final byte[] dest, final byte[] data, final int offset, int length)