dont use too often toLowerCase

dont use += inside iteration to string
reworked input stream reading, due dont need read all byte array from stream