MCPcopy Create free account
hub / github.com/M66B/FairEmail / invalidate

Method invalidate

app/src/main/java/com/sun/mail/pop3/POP3Message.java:283–309  ·  view source on GitHub ↗

Invalidate the cache of content for this message object, causing it to be fetched again from the server the next time it is needed. If invalidateHeaders is true, invalidate the headers as well. @param invalidateHeaders invalidate the headers as well?

(boolean invalidateHeaders)

Source from the content-addressed store, hash-verified

281 * @param invalidateHeaders invalidate the headers as well?
282 */
283 public synchronized void invalidate(boolean invalidateHeaders) {
284 content = null;
285 InputStream rstream = rawData.get();
286 if (rstream != null) {
287 // note that if the content is in the file cache, it will be lost
288 // and fetched from the server if it's needed again
289 try {
290 rstream.close();
291 } catch (IOException ex) {
292 // ignore it
293 }
294 rawData = new SoftReference<>(null);
295 }
296 if (contentStream != null) {
297 try {
298 contentStream.close();
299 } catch (IOException ex) {
300 // ignore it
301 }
302 contentStream = null;
303 }
304 msgSize = -1;
305 if (invalidateHeaders) {
306 headers = null;
307 hdrSize = -1;
308 }
309 }
310
311 /**
312 * Fetch the header of the message and the first <code>n</code> lines

Callers 1

closeMethod · 0.95

Calls 2

getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected