Split a long string

This commit is contained in:
Taro L. Saito 2011-04-11 10:49:38 +09:00
parent 121b157dc7
commit b8ab746a9d
1 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,8 @@ public class SnappyTest
@Test
public void simpleUsage() throws Exception {
String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper for using Snappy from Google (written in C++), a fast compresser/decompresser.";
String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper"
+ " for using Snappy from Google (written in C++), a fast compresser/decompresser.";
byte[] compressed = Snappy.compress(input.getBytes("UTF-8"));
byte[] uncompressed = Snappy.uncompress(compressed);
String result = new String(uncompressed, "UTF-8");