Code example for DataInputStream

Methods: available, read

0
package com.avast.android.generic.util; 
 
import java.io.Closeable; 
import java.io.DataInputStream; 
 
public class h 
{ 
  private static int a(DataInputStream paramDataInputStream1, DataInputStream paramDataInputStream2, StringBuilder paramStringBuilder1, StringBuilder paramStringBuilder2)
  { 
    int i = -1;
    int j = paramDataInputStream1.available();
    if (j > 0)
    { 
      byte[] arrayOfByte2 = new byte[j];
      i = paramDataInputStream1.read(arrayOfByte2, 0, j);
      String str = new String(arrayOfByte2);
      if (str.contains("denied"))
        throw new Exception("Permission denied");
      paramStringBuilder1.append(str);
    } 
    t.a("AvastGeneric", "Read exactly " + i + " bytes from result stream");
    int k = paramDataInputStream2.available();
    if (k > 0)
    { 
      byte[] arrayOfByte1 = new byte[k];
      paramDataInputStream2.read(arrayOfByte1, 0, k);