Java 썸네일형 리스트형 Comparable 구현하여 사용자객체 정렬하기 public class UserObject implements Comparable { private int priority; public UserObject(int priority) { this.priority = priority; } public int compareTo(UserObject o) { if(this.priority o.priority) { return 1; } else { return 0; } } public String toString() { return "priority : " + this.priority; } } public class CompareTest { public static v.. 더보기 자바(java) GZIPInputStream/OutputStream을 이용한 문자열 압축과 압축해제 import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; import java.io.IOException; public class StringZipper { //GZIPOutputStream을 이용하여 문자열 압축하기 public byte[] zipStringToBytes(String input) throws IOException { ByteArrayOutputSt.. 더보기