Obsolete
Status Update
Comments
ra...@google.com <ra...@google.com>
ri...@gmail.com <ri...@gmail.com> #3
Thanks. Let us know when you have some API design (not looking for a doc, just commenting here is also fine, whichever is easier for you).
One tricky bit about this one is the "transactionality" of it.
e.g. we need to handle the case where we called onPopuplated but application crashed before onPopulated
could succeed. We need to re-run it in the next run.
We might do this by keeping a record in room_master_table
(there might be a better option, this is the first thing that comes to my mind)
Description
@Override public int available() throws IOException {
checkNotClosed();
return bytesRemaining == 0 ? 0 : Math.min(in.available(), bytesRemaining);
}
This code is from lines 58-61 of
I think the 'Math.min' is wrong and should be just 'bytesRemaining' or 'Math.max' In my case, I successfully read a
web page (that returned a 788 byte long .gif image) with this code:
URL url = new URL(urlStr);
HttpsURLConnection httpsUrlConnection = (HttpsURLConnection)url.openConnection();
TLSSocketFactory tlsSocketFactory = new TLSSocketFactory();
httpsUrlConnection.setSSLSocketFactory(tlsSocketFactory);
InputStream inStrm = httpsUrlConnection.getInputStream();
inStrm.available() returned 0, but 'bytesRemaining' correctly contained '788' but 'in.available() returned 0 so
Math.min(0, 788) incorrectly returned 0