public static class Data.FileData

  1. Object
  2. Data.FileData

ImplementsData

Wraps a File as a Data object.

Constructors

public FileData(File file)Creates a new Data wrapper for a file.

Methods

public void appendTo(OutputStream output) throws IOExceptionAppends the data’s content to an output stream.
public long getSize() throws IOExceptionGets the size of the data content.

Inherited nested types

Inherited methods

Constructor details

FileData

public FileData(File file)
Creates a new Data wrapper for a file.

Parameters

file File
The file to be wrapped.

Method details

appendTo

public void appendTo(OutputStream output) throws IOException
Appends the data’s content to an output stream.

Parameters

output OutputStream
The output stream to append to.

getSize

public long getSize() throws IOException
Gets the size of the data content.

Returns

Size of content in bytes.