Code example for DataInputStream

Methods: readLine

0
        } 
    } 
 
    private int readPartHeader(DataInputStream datainputstream) throws IOException {
        String s = null;
        String s1 = datainputstream.readLine();
        if(null == s1) {
        	return -1; 
        } 
        if(!s1.equals("")) {
        	Matcher matcher = PATTERN_ID.matcher(s1);
            if(matcher.matches()) {
                s = matcher.group(1);
                try 
                { 
                    return Integer.parseInt(s);
                } 
                catch(NumberFormatException numberformatexception)
                { 
                    throw new IOException((new StringBuilder("Invalid response format. Section ID = '")).append(s).append("'").toString());
                }