Top Description Fields Constructors Methods
com.sun.mail.pop3

pack-priv Class WritableSharedFile

extends SharedFileInputStream
Class Inheritance
Imports
java.io.File, .IOException, .RandomAccessFile, javax.mail.util.SharedFileInputStream

A subclass of SharedFileInputStream that also allows writing.

Field Summary

Modifier and TypeField and Description
private AppendStream
private RandomAccessFile
Inherited from javax.mail.util.SharedFileInputStream:
bufposbufsizedataleninstart

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides javax.mail.util.SharedFileInputStream.close.

Implements java.io.Closeable.close.

Close the readable and writable files.
public synchronized AppendStream
getAppendStream()

Return a new AppendStream, but only if one isn't in active use.

public RandomAccessFile
getWritableFile()

Return the writable version of this file.

pack-priv synchronized long
updateLength()

Update the size of the readable file after writing to the file.

Inherited from javax.mail.util.SharedFileInputStream:
availablefinalizegetPositionmarkmarkSupportednewStreamreadreadresetskip

Field Detail

afback to summary
private AppendStream af
rafback to summary
private RandomAccessFile raf

Constructor Detail

WritableSharedFileback to summary
public WritableSharedFile(File file) throws IOException

Method Detail

closeback to summary
public void close() throws IOException

Overrides javax.mail.util.SharedFileInputStream.close.

Implements java.io.Closeable.close.

Close the readable and writable files.

Annotations
@Override
Exceptions
IOException:

Doc from javax.mail.util.SharedFileInputStream.close.

if an I/O error occurs.

getAppendStreamback to summary
public synchronized AppendStream getAppendStream() throws IOException

Return a new AppendStream, but only if one isn't in active use.

getWritableFileback to summary
public RandomAccessFile getWritableFile()

Return the writable version of this file.

updateLengthback to summary
pack-priv synchronized long updateLength() throws IOException

Update the size of the readable file after writing to the file. Updates the length to be the current size of the file.