org.pixel.commons.util.TextUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pixel-commons-linux Show documentation
Show all versions of pixel-commons-linux Show documentation
Java 2D Game Framework inspired on the popular XNA framework.
The newest version!
/*
* This software is available under Apache License
* Copyright (c) 2020
*/
package org.pixel.commons.util;
import java.nio.ByteBuffer;
public class TextUtils {
/**
* Convert bytebuffer to string
*
* @param buffer
* @return
*/
public static String convertToString(ByteBuffer buffer) {
byte[] array = new byte[buffer.limit()];
buffer.get(array, 0, buffer.limit());
return new String(array);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy