private class ClassServer.Task extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private Socket |
sock
Socket for the incoming request
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ClassServer.Task(Socket sock)
Simple constructor
|
Modifier and Type | Method and Description |
---|---|
private String |
canon(String path)
Canonicalize the path
|
private byte[] |
getBytes(InputStream in,
long length)
Read specified number of bytes and always close the stream.
|
private byte[] |
getBytes(String path)
Return the bytes of the requested file, or null if not found.
|
void |
run()
Process the request
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private Socket sock
public ClassServer.Task(Socket sock)
private byte[] getBytes(InputStream in, long length) throws IOException
IOException
private byte[] getBytes(String path) throws IOException
IOException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.