| 170 | } |
| 171 | |
| 172 | public static void main4(String[] args) throws Exception { |
| 173 | System.out.println("begin"); |
| 174 | RocksDB.loadLibrary(); |
| 175 | var wb = new WriteBatch(); |
| 176 | wb.put("ABC".getBytes(), "1234".getBytes()); |
| 177 | wb.delete("ABC".getBytes()); |
| 178 | System.out.println(wb.getDataSize()); |
| 179 | var d = wb.data(); |
| 180 | System.out.println(BitConverter.toString(d)); |
| 181 | |
| 182 | wb = new WriteBatch(d); |
| 183 | System.out.println(wb.getDataSize()); |
| 184 | d = wb.data(); |
| 185 | System.out.println(BitConverter.toString(d)); |
| 186 | System.out.println("end"); |
| 187 | } |
| 188 | } |