use of org.neo4j.bolt.packstream.PackedOutputArray in project neo4j by neo4j.
the class TransportUnauthenticatedConnectionErrorIT method createHelloWithOversizeDeclaredList.
byte[] createHelloWithOversizeDeclaredList(Neo4jPack neo4jPack) throws IOException {
PackedOutputArray output = new PackedOutputArray();
Neo4jPack.Packer packer = neo4jPack.newPacker(output);
packer.packStructHeader(2, HelloMessage.SIGNATURE);
packer.packMapHeader(1);
packer.pack("x");
// list claims to be huge when it isn't
packer.packListHeader(Integer.MAX_VALUE);
TextArray labels = ALICE.labels();
for (int i = 0; i < labels.length(); i++) {
String labelName = labels.stringValue(i);
packer.pack(labelName);
}
return output.bytes();
}
use of org.neo4j.bolt.packstream.PackedOutputArray in project neo4j by neo4j.
the class UnsupportedStructTypesV2IT method createRunWith.
private byte[] createRunWith(ThrowingConsumer<Neo4jPack.Packer, IOException> valuePacker) throws IOException {
PackedOutputArray out = new PackedOutputArray();
Neo4jPack.Packer packer = new Neo4jPackV2().newPacker(out);
packer.packStructHeader(2, RunMessage.SIGNATURE);
packer.pack("RETURN $x");
packer.packMapHeader(1);
packer.pack("x");
valuePacker.accept(packer);
return out.bytes();
}
use of org.neo4j.bolt.packstream.PackedOutputArray in project neo4j by neo4j.
the class UnsupportedStructTypesV1V2IT method createUnknownMsg.
private byte[] createUnknownMsg() throws IOException {
PackedOutputArray out = new PackedOutputArray();
Neo4jPack.Packer packer = neo4jPack.newPacker(out);
packer.packStructHeader(0, DEFAULT_SIGNATURE);
return out.bytes();
}
use of org.neo4j.bolt.packstream.PackedOutputArray in project neo4j by neo4j.
the class UnsupportedStructTypesV1V2IT method createMsgWithNullKey.
private byte[] createMsgWithNullKey() throws IOException {
PackedOutputArray out = new PackedOutputArray();
Neo4jPack.Packer packer = neo4jPack.newPacker(out);
packer.packStructHeader(2, DEFAULT_SIGNATURE);
packer.pack("Text");
packMapWithNullKey(packer);
return out.bytes();
}
use of org.neo4j.bolt.packstream.PackedOutputArray in project neo4j by neo4j.
the class UnsupportedStructTypesV1V2IT method createMsgWithDuplicateKey.
private byte[] createMsgWithDuplicateKey() throws IOException {
PackedOutputArray out = new PackedOutputArray();
Neo4jPack.Packer packer = neo4jPack.newPacker(out);
packer.packStructHeader(2, DEFAULT_SIGNATURE);
packer.pack("Text");
packMapWithDuplicateKey(packer);
return out.bytes();
}
Aggregations