buf[size] = b[0];
baos.write(b[0]);
    public String readHeaders()        throws MalformedStreamException    {        int i = 0;        byte b[] = new byte[1];        int sizeMax = HEADER_PART_SIZE_MAX;        byte[] buf = new byte[sizeMax];        int size = 0;        while (i < 4)        {            try            {                b[0] = readByte();            }            catch (IOException e)            {                throw new MalformedStreamException("Stream ended unexpectedly");            }            size++;            if (b[0] == HEADER_SEPARATOR[i])            {                i++;            }            else            {                i = 0;            }            if (size <= sizeMax)            {                buf[size] = b[0];            }        }        return new String(buf, 0, tail);    }