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
Modifier and TypeFieldDescriptionprotected final Buffer
static final String
static final String
Buffer boolean property set when an error occurs.static final int
Size of I/O buffers.static final String
protected final String
static final String
protected String
static final int
Number of lines per progress increment.protected final Object
protected final VFS
protected final View
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Reader
Tries to detect if the stream is gzipped, and if it has an encoding specified with an XML PI.protected void
static int
Size of byte I/O buffers.static int
Size of character I/O buffers.protected SegmentBuffer
toString()
protected void
write
(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:
IOException
InterruptedException
-
write
- Throws:
IOException
InterruptedException
-
endSessionQuietly
protected void endSessionQuietly()
-