I want to create a byte array of size 512 bytes.
For the first 100 bytes I want to reserve it for filename, for the next 412 bytes I want to use it to store data from the file itself.
Something like this :
|----100byte for file name ----||------------412 byte for file data------------|
byte[] buffer = new byte[512];
add the filename of byte[] type into the first 100 position
insert the file data after the first 100 position
The file name can be less than 100 bytes.
But I am unable to append the file data at the specific position... how should I do that?