# Serialization

> USearch for Java

Checkpoints ride the SafeGraphs interchange format, and the path extension picks the layout: a `.safegraphs` path is one monolith, a `.safegraphs.json` path is a manifest cataloging many.
A loaded index takes its geometry and metric from the checkpoint's own headers, and only the placement and `valuesPerKey` from its constructor.

```java
index.on(pool).save("index.safegraphs");
DenseIndex loaded = DenseIndex.loadRam("index.safegraphs");

DenseMetadata described = DenseIndex.metadataRead("index.safegraphs", pool);

Monolith monolith = index.saveBuffer(arena);
DenseIndex copied = DenseIndex.loadRamBuffer(monolith.segment());
```

Only the call can size a monolith, so `saveBuffer` lands it in an arena, as [Arenas](https://www.unum.cloud/docs/usearch/java/inputs-and-outputs.md#arenas) describes, and `segment` reads it in place.

`DenseMetadata` carries the four fields a checkpoint froze: dimensions, metric, quantization and connectivity.
The placement is absent because a checkpoint records where it was written rather than where a reader must keep it, and `valuesPerKey` is absent because it bounds a live handle's mutable state rather than the serialized form.

`import cloud.unum.usearch.*;`

## Monolith

The monolith a saveBuffer of any modality wrote into an arena, as `DenseVerbs#saveBuffer` does.

```java
class Monolith
```

Valid until the arena's next call or its close.

