@Component public class Snappy extends Object
| Constructor and Description |
|---|
Snappy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compress(String content,
String filename)
将字符串以Snappy格式压缩然后输出到指定文件中, 默认UTF-8
|
boolean |
compress(String content,
String filename,
String charset)
将字符串以Snappy格式压缩然后输出到指定文件中
|
String |
uncompress(String file)
将Snappy格式的文件解压返回文件内容
|
public String uncompress(String file) throws IOException
file - IOExceptionpublic boolean compress(String content, String filename) throws IOException
content - filename - IOExceptionpublic boolean compress(String content, String filename, String charset) throws IOException
content - filename - IOExceptionCopyright © 2021 Clouds Studio. All rights reserved.