I am newbie in android. I want to resize a byte array in function. Is it possible or not. If any problem please suggest a solution to do it.

```
public void myfunction(){
    byte[] bytes = new byte[1024];
    ....................
    .... do some operations........
    ................................
    byte[] bytes = new byte[2024];
}

```