Java Byte Array Create toBytes(byte[] buffer, int pos, String string)

Here you can find the source of toBytes(byte[] buffer, int pos, String string)

Description

to Bytes

License

Apache License

Declaration

public static int toBytes(byte[] buffer, int pos, String string) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int toBytes(byte[] buffer, int pos, String string) {
        byte[] strBytes = string.getBytes();
        System.arraycopy(strBytes, 0, buffer, pos, strBytes.length);
        return pos + strBytes.length;
    }//ww w  .ja  v  a 2s  .  c  o  m
}

Related

  1. toByteArrayV6(String address)
  2. toByteInfo(long bytes)
  3. toBytes(boolean[] input)
  4. toBytes(byte data)
  5. toBytes(byte[] b, int offset, long val)
  6. toBytes(byte[] ipAddress, int port)
  7. toBytes(Byte[] values)
  8. toBytes(char c)
  9. toBytes(char value)