mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
Add support for uploading stickers.
This commit is contained in:
parent
6cfddc0aff
commit
8b1cb040e0
6 changed files with 224 additions and 36 deletions
|
@ -1,9 +1,8 @@
|
|||
package org.asamk.signal.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringWriter;
|
||||
import org.whispersystems.signalservice.internal.util.Util;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
@ -35,6 +34,12 @@ public class IOUtils {
|
|||
return output.toString();
|
||||
}
|
||||
|
||||
public static byte[] readFully(InputStream in) throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
Util.copy(in, baos);
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
public static void createPrivateDirectories(String directoryPath) throws IOException {
|
||||
final File file = new File(directoryPath);
|
||||
if (file.exists()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue