得到上下文，为空则自动创建

@return RPC内置上下文
543593
public static RpcInternalContext getContext() {
        RpcInternalContext context = LOCAL.get();
        if (context == null) {
            context = new RpcInternalContext();
            LOCAL.set(context);
        }
        return context;
    }
1292632
protected NaviRpcExporter getRpcExporter(HttpServletRequest httpServletRequest) {
        String context = httpServletRequest.getPathInfo();
        if (context == null) {
            throw new InvalidRequestException("Rpc path invalid");
        }
        if (context.length() > 0) {
            context = context.substring(1);
        }
        NaviRpcExporter serviceExporter = serviceLocator.getService(context);
        if (serviceExporter == null) {
            throw new ServiceNotFoundException("No rpc service found for " + context);
        }
        return serviceExporter;
    }
1020443
public static RpcInvokeContext getContext() {
        RpcInvokeContext context = LOCAL.get();
        if (context == null) {
            context = new RpcInvokeContext();
            LOCAL.set(context);
        }
        return context;
    }
1369668
@GET
    public Response getStreamContents() {

        // Intercept all output
        StreamingOutput stream = new StreamingOutput() {

            @Override
            public void write(OutputStream output) throws IOException {
                try {
                    tunnel.interceptStream(streamIndex, output);
                }
                catch (GuacamoleException e) {
                    throw new IOException(e);
                }
            }

        };

        // Begin successful response
        ResponseBuilder responseBuilder = Response.ok(stream, mediaType);

        // Set Content-Disposition header for "application/octet-stream"
        if (mediaType.equals(MediaType.APPLICATION_OCTET_STREAM))
            responseBuilder.header("Content-Disposition", "attachment");

        return responseBuilder.build();

    }
1105536
public function getContent() {
        static $content  = '';
        static $isRead = false;

        if (!$isRead) {
            if ($this->getContentType() == 'multipart/form-data') {
                // file upload
                if ($_POST) {                                                           // php://input is not available with
                    $content = '$_POST => '.print_r($_POST, true).NL;                   // enctype="multipart/form-data"
                    // TODO: we should limit excessive variable values to 1KB
                }
                $content .= '$_FILES => '.print_r($this->getFiles(), true);
            }
            else {
                // regular request body
                $content = file_get_contents('php://input');
            }
            $isRead = true;
        }
        return $content;
    }
977048
public function read()
    {
        $path = $this->getProjectPath() . '/' . $this->getOutputFile();
        if (!is_readable($path)) {
            $this->getContainer()->setValues(null);
            return $this->getContainer();
        }
        $newContainer = unserialize(file_get_contents($path));
        return $newContainer;
    }
128865
public function getSync()
    {
        if (isset($this->redisClient)) {
            return $this->redisClient;
        }

        //task进程内同步redis连接
        $this->redisClient = new \Redis();
        $conf              = $this->config['redis'][$this->active];
        $addr              = $conf['ip'] . ':' . $conf['port'] . ' ';
        try {
            // 连接
            if (!$this->redisClient->connect($conf['ip'], $conf['port'], 0.05)) {
                throw new Exception($this->redisClient->getLastError());
            }

            // 验证
            if ($this->config->has('redis.' . $this->active . '.password')) {//存在验证
                $addr .= 'auth password failed, message ';
                if (!$this->redisClient->auth($this->config['redis'][$this->active]['password'])) {
                    throw new Exception($this->redisClient->getLastError());
                }
            }

            // select
            if ($this->config->has('redis.' . $this->active . '.select')) {//存在验证
                $addr .= 'select failed, message ';
                if (!$this->redisClient->select($this->config['redis'][$this->active]['select'])) {
                    throw new Exception($this->redisClient->getLastError());
                }
            }
        } catch (Exception $e) {
            throw new Exception($addr . $e->getMessage());
        }

        return $this->redisClient;
    }
516967
public function getContentStream()
    {
        if (!$this->objectId || !$this->getStreamId()) {
            return null;
        }

        return $this->session->getBinding()->getObjectService()->getContentStream(
            $this->session->getRepositoryInfo()->getId(),
            $this->objectId,
            $this->getStreamId()
        );
    }
666949
public synchronized String
toMasterFile() {
	Iterator zentries = data.entrySet().iterator();
	StringBuffer sb = new StringBuffer();
	nodeToString(sb, originNode);
	while (zentries.hasNext()) {
		Map.Entry entry = (Map.Entry) zentries.next();
		if (!origin.equals(entry.getKey()))
			nodeToString(sb, entry.getValue());
	}
	return sb.toString();
}
127654
@Override
    public StorePath uploadFile(FastFile fastFile) {
        Validate.notNull(fastFile.getInputStream(), "上传文件流不能为空");
        Validate.notBlank(fastFile.getFileExtName(), "文件扩展名不能为空");
        // 获取存储节点
        StorageNode client = getStorageNode(fastFile.getGroupName());
        // 上传文件
        return uploadFileAndMetaData(client, fastFile.getInputStream(),
                fastFile.getFileSize(), fastFile.getFileExtName(),
                fastFile.getMetaDataSet());
    }
942922
public File[] getFiles() {

        String path = mRequest.getParameter("path");
        if (path == null) {
            path = mApp.getInitParameter("defaultPath");
        }
        if (path == null) {
            path = "/";
        }

        File activefile = new File(path);
        if( activefile.isDirectory()) {
            return activefile.listFiles();
        } else {
            return null;
        }
    }
87470
function() {
                var sts = [].slice.call( arguments, 0 ),
                    ret = [],
                    i = 0,
                    len = this._queue.length,
                    file;
    
                for ( ; i < len; i++ ) {
                    file = this._queue[ i ];
    
                    if ( sts.length && !~$.inArray( file.getStatus(), sts ) ) {
                        continue;
                    }
    
                    ret.push( file );
                }
    
                return ret;
            }
738511
private static long getRSSFromProcFS() {
        try {
            File statFile = new File(String.format("/proc/%d/stat", pid));
            FileInputStream fis = new FileInputStream(statFile);
            try {
                BufferedReader r = new BufferedReader(new InputStreamReader(fis));
                String stats = r.readLine();
                String[] parts = stats.split(" ");
                return Long.parseLong(parts[23]) * 4 * 1024;
            } finally {
                fis.close();
            }
        }
        catch (Exception e) {
            return -1;
        }
    }
1240487
public String[] getFileList()
    {
        String[] files = null;
        String strFilename = this.getProperty("filename");
        if (strFilename != null)
        {
            files = new String[1];
            files[0] = strFilename;
        }
        String strDirname = this.getProperty("folder");
        if (strDirname != null)
        {
            FileList list = new FileList(strDirname);
            files = list.getFileNames();
            if (!strDirname.endsWith("/"))
                strDirname += "/";
            for (int i = 0; i < files.length; i++)
            {
                files[i] = strDirname + files[i];   // Full pathname
            }
        }
        return files;
    }
753878
protected final char[] getCopyBuffer()
    {
        char[] buf = mCopyBuffer;
        if (buf == null) {
            mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
        }
        return buf;
    }
616961
public function getStatus()
    {
        $status = $this->real_call->getStatus();
        $this->_rpcPostProcess($status, $this->response);
        return $status;
    }
94673
public function getContents() : string
    {
        $r = false;
        $err = ($this->stream === null || $this->readable === false);

        if ($err === false) {
            $r = stream_get_contents($this->stream);
        }

        if ($err === true || $r === false) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Could not get contents of stream.");
            // @codeCoverageIgnoreEnd
        }

        return $r;
    }