Package org.verapdf.io
Class InternalOutputStream
- java.lang.Object
-
- org.verapdf.io.InternalOutputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ASOutputStream
public class InternalOutputStream extends Object implements ASOutputStream, Closeable
- Author:
- Timur Kamalov
-
-
Constructor Summary
Constructors Constructor Description InternalOutputStream(File file)InternalOutputStream(String fileName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()FilegetFile()static InternalOutputStreamgetInternalOutputStream()Creates temp file and opens output stream into it.longgetOffset()InternalOutputStreamseek(long offset)voidseekEnd()InternalOutputStreamwrite(boolean value)InternalOutputStreamwrite(byte value)longwrite(byte[] buffer)longwrite(byte[] buffer, int size)longwrite(byte[] buffer, int offset, int size)InternalOutputStreamwrite(char value)InternalOutputStreamwrite(double value)InternalOutputStreamwrite(int value)InternalOutputStreamwrite(long value)InternalOutputStreamwrite(String value)longwrite(ASInputStream stream)
-
-
-
Constructor Detail
-
InternalOutputStream
public InternalOutputStream(String fileName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
InternalOutputStream
public InternalOutputStream(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
getInternalOutputStream
public static InternalOutputStream getInternalOutputStream() throws IOException
Creates temp file and opens output stream into it. File path can be obtained after.- Returns:
- new InternalOutputStream.
- Throws:
IOException
-
write
public long write(byte[] buffer) throws IOException- Specified by:
writein interfaceASOutputStream- Throws:
IOException
-
write
public long write(byte[] buffer, int size) throws IOException- Throws:
IOException
-
write
public long write(byte[] buffer, int offset, int size) throws IOException- Specified by:
writein interfaceASOutputStream- Throws:
IOException
-
write
public long write(ASInputStream stream) throws IOException
- Specified by:
writein interfaceASOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceASOutputStream- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
seekEnd
public void seekEnd() throws IOException- Throws:
IOException
-
getOffset
public long getOffset() throws IOException- Throws:
IOException
-
seek
public InternalOutputStream seek(long offset) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(char value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(byte value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(boolean value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(int value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(long value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(double value) throws IOException
- Throws:
IOException
-
write
public InternalOutputStream write(String value) throws IOException
- Throws:
IOException
-
getFile
public File getFile()
-
-