java.lang.Object
org.gjt.sp.util.Task
org.gjt.sp.jedit.bufferio.IoTask
org.gjt.sp.jedit.bufferio.BufferIORequest
- All Implemented Interfaces:
Runnable,ProgressObserver
- Direct Known Subclasses:
BufferAutosaveRequest,BufferInsertRequest,BufferLoadRequest,BufferSaveRequest
A buffer I/O request.
- Version:
- $Id: BufferIORequest.java 24414 2016-06-19 11:07:43Z kerik-sf $
- Author:
- Slava Pestov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Bufferstatic final Stringstatic final StringBuffer boolean property set when an error occurs.static final intSize of I/O buffers.static final Stringprotected final Stringstatic final Stringprotected Stringstatic final intNumber of lines per progress increment.protected final Objectprotected final VFSprotected final View -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ReaderTries to detect if the stream is gzipped, and if it has an encoding specified with an XML PI.protected voidstatic intSize of byte I/O buffers.static intSize of character I/O buffers.protected SegmentBuffertoString()protected voidwrite(Buffer buffer, OutputStream out) Methods inherited from class org.gjt.sp.util.Task
_run, cancel, getLabel, getMaximum, getState, getStatus, getValue, isCancellable, run, setCancellable, setLabel, setMaximum, setStatus, setValue
-
Field Details
-
IOBUFSIZE
public static final int IOBUFSIZESize of I/O buffers.- See Also:
-
PROGRESS_INTERVAL
public static final int PROGRESS_INTERVALNumber of lines per progress increment.- See Also:
-
LOAD_DATA
- See Also:
-
END_OFFSETS
- See Also:
-
NEW_PATH
- See Also:
-
ERROR_OCCURRED
Buffer boolean property set when an error occurs.- See Also:
-
view
-
buffer
-
session
-
vfs
-
path
-
markersPath
-
-
Constructor Details
-
BufferIORequest
Creates a new buffer I/O request.- Parameters:
view- The viewbuffer- The buffersession- The VFS sessionvfs- The VFSpath- The path
-
-
Method Details
-
toString
-
getCharIOBufferSize
public static int getCharIOBufferSize()Size of character I/O buffers. -
getByteIOBufferSize
public static int getByteIOBufferSize()Size of byte I/O buffers. -
autodetect
Tries to detect if the stream is gzipped, and if it has an encoding specified with an XML PI.- Throws:
IOException
-
read
protected SegmentBuffer read(Reader in, long length, boolean insert) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
write
- Throws:
IOExceptionInterruptedException
-
endSessionQuietly
protected void endSessionQuietly()
-