(byte buf[])
| 124 | int pbyte; |
| 125 | |
| 126 | public int read(byte buf[]) throws IOException { |
| 127 | //#ifdef TLS |
| 128 | if (tlsExclusive) |
| 129 | return 0; |
| 130 | //#endif |
| 131 | int avail; |
| 132 | //#if (android && TLS) |
| 133 | avail = inpStream.read(buf, 0, buf.length); |
| 134 | //#else |
| 135 | //# avail = inpStream.available(); |
| 136 | //# |
| 137 | //# if (avail==0) { |
| 138 | //#if !ZLIB |
| 139 | //# //trying to fix phillips 9@9 |
| 140 | //# // if (!Config.getInstance().istreamWaiting) avail=1; |
| 141 | //# // else |
| 142 | //#endif |
| 143 | //# return 0; |
| 144 | //# } |
| 145 | //# if (avail>buf.length) avail=buf.length; |
| 146 | //# |
| 147 | //# avail=inpStream.read(buf, 0, avail); |
| 148 | //#endif |
| 149 | if (StaticData.XmlDebug) { |
| 150 | if (avail > 0) { |
| 151 | System.out.println("<< " + new String(buf, 0, avail, "UTF-8")); |
| 152 | } |
| 153 | } |
| 154 | setRecv(bytesRecv + avail); |
| 155 | updateTraffic(); |
| 156 | return avail; |
| 157 | } |
| 158 | |
| 159 | private void updateTraffic() { |
| 160 | StaticData.getInstance().traffic=getBytes(); |
nothing calls this directly
no test coverage detected