()
| 221 | } |
| 222 | |
| 223 | private static void testGetMemFileBuffer() |
| 224 | { |
| 225 | gdal.FileFromMemBuffer("/vsimem/test", new byte[] {1, 2, 3}); |
| 226 | for(int iter = 0; iter < 2; iter++) |
| 227 | { |
| 228 | byte[] res = gdal.GetMemFileBuffer("/vsimem/test"); |
| 229 | if (res.length != 3 ) |
| 230 | throw new RuntimeException("res.length != 3"); |
| 231 | if (res[0] != 1 || res[1] != 2 || res[2] != 3) |
| 232 | throw new RuntimeException("res != {1, 2, 3}"); |
| 233 | } |
| 234 | } |
| 235 | } |