com.amazonaws.services.lambda.runtime.api.client.util.LambdaOutputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-lambda-java-runtime-interface-client Show documentation
Show all versions of aws-lambda-java-runtime-interface-client Show documentation
The AWS Lambda Java Runtime Interface Client implements the Lambda programming model for Java
/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
package com.amazonaws.services.lambda.runtime.api.client.util;
import java.io.OutputStream;
import java.io.IOException;
public class LambdaOutputStream extends OutputStream {
private final OutputStream inner;
public LambdaOutputStream(OutputStream inner) {
this.inner = inner;
}
@Override
public void write(int b) throws IOException {
write(new byte[]{(byte) b});
}
@Override
public void write(byte[] bytes) throws IOException {
write(bytes, 0, bytes.length);
}
@Override
public void write(byte[] bytes, int offset, int length) throws IOException {
inner.write(bytes, offset, length);
}
}