com.salesforce.einsteinbot.sdk.util.BytesUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of einstein-bot-sdk-java Show documentation
Show all versions of einstein-bot-sdk-java Show documentation
Java SDK to interact with Einstein Bots Runtime.
This SDK is a wrapper around the Einstein Bots Runtime API that provides a few added features out of the box like Auth support, Session management
/*
* Copyright (c) 2022, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package com.salesforce.einsteinbot.sdk.util;
import org.springframework.core.io.buffer.DataBuffer;
/**
* BytesUtil - BytesUtil contains utility methods to work with Bytes
*
* @author relango
*/
public class BytesUtil {
static byte[] extractBytesAndReset(final DataBuffer data) {
final byte[] bytes = new byte[data.readableByteCount()];
data.read(bytes);
data.readPosition(0);
return bytes;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy