code: private String zeroEndByteArrayToString(byte[] bytes) throws IOException
      {
          int i = 0;
          
          for ( i = 0; i < bytes.length && bytes[i] != 0; i++ );
          
          return new String( bytes, 0, i );
          
      }
docs: Converts byte array to <code>String</code>.
  
  It assumes that String ends with \0 value.
  
  @param bytes byte array containing the string.
  @return String retrieved from byte array.
  @throws IOException if reading error occurred.