please help

hello friends

i have a scenario like

1) i have a ByteArrayOutputStream

2) i need to check the first two bytes ,if they are 13,10 ,have to remove them

3) later ,i to convert that to byte[]

any body please help how to do that without arraycopy

regards

OS

[303 byte] By [LoveOpensourcea] at [2007-11-27 8:57:59]
# 1
do you delete all the '\r' and '\n' from the byte[]? or delete the first '\r' and '\n'?
Stone.lia at 2007-7-12 21:23:17 > top of Java-index,Java Essentials,Java Programming...
# 2
actually my job , find that whether the ByteArrayOutputStream start with a CRLF and if is then i have to remove that CRLFno concerns with later bytes. i need to check very first two bytesregards'OS
LoveOpensourcea at 2007-7-12 21:23:17 > top of Java-index,Java Essentials,Java Programming...
# 3
huh, Is there a ByteArrayInputStream on your hand ,not is a ByteArrayOutputStream ?If is the ByteArrayInputStream, u can invoke 'read(byte[] b, 0, 2)'. The parameter 'b' is a new byte[2].Then check the element of the byte array.
Stone.lia at 2007-7-12 21:23:17 > top of Java-index,Java Essentials,Java Programming...