Modifier and Type | Method and Description |
---|---|
Source |
createBufferSource(Buffer buffer)
|
Source |
createByteArraySource(byte[] array)
Create
Source based on byte array. |
Source |
createByteArraySource(byte[] array,
int offs,
int len)
Create
Source based on byte array. |
Source |
createFileSource(File file)
|
Source |
createFileSource(String filename)
Create
Source based on file. |
Source |
createStringSource(String string)
|
Source |
createStringSource(String string,
Charset charset)
|
public Source createByteArraySource(byte[] array)
Source
based on byte array.array
- byte[] to be written.Source
.public Source createByteArraySource(byte[] array, int offs, int len)
Source
based on byte array.array
- byte[] to be written.offs
- the source offset in the byte array.len
- the source length.Source
.public Source createFileSource(String filename) throws FileNotFoundException, IOException
Source
based on file.filename
- the filename.Source
.FileNotFoundException
IOException
public Source createFileSource(File file) throws FileNotFoundException, IOException
file
- the File
.Source
.FileNotFoundException
IOException
Copyright © 2015 Oracle Corporation. All rights reserved.