public void handleRequest()

in aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/EventHandlerLoader.java [812:845]


        public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
                throws IOException {
            final Object[] args = new Object[argSize];
            int idx = 0;

            if (needsInput) {
                args[idx++] = inputStream;
            } else {
                inputStream.close();
            }

            if (needsOutput) {
                args[idx++] = outputStream;
            }

            if (needsContext) {
                args[idx++] = context;
            }

            try {
                m.invoke(this.instance, args);
                if (!needsOutput) {
                    outputStream.write(_JsonNull);
                }
            } catch (InvocationTargetException e) {
                if (e.getCause() != null) {
                    throw UnsafeUtil.throwException(filterStackTrace(e.getCause()));
                } else {
                    throw UnsafeUtil.throwException(filterStackTrace(e));
                }
            } catch (Throwable t) {
                throw UnsafeUtil.throwException(filterStackTrace(t));
            }
        }