test_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/test/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValueTest.java
test_class.identifier: PostgreSQLUnspecifiedBinaryProtocolValueTest
test_case.body: @Test
      public void assertRead() {
          String timestampStr = "2020-08-23 15:57:03+08";
          int expectedLength = 4 + timestampStr.length();
          ByteBuf byteBuf = ByteBufTestUtils.createByteBuf(expectedLength);
          byteBuf.writeInt(timestampStr.length());
          byteBuf.writeCharSequence(timestampStr, StandardCharsets.ISO_8859_1);
          byteBuf.readInt();
          PostgreSQLPacketPayload payload = new PostgreSQLPacketPayload(byteBuf);
          Object result = new PostgreSQLUnspecifiedBinaryProtocolValue().read(payload);
          assertNotNull(result);
          assertTrue(result instanceof PostgreSQLTypeUnspecifiedSQLParameter);
          assertThat(result.toString(), is(timestampStr));
          assertThat(byteBuf.readerIndex(), is(expectedLength));
      }
test_case.class_method_signature: PostgreSQLUnspecifiedBinaryProtocolValueTest.assertRead()
test_case.full_signature: @Test public void assertRead()
test_case.identifier: assertRead
test_case.invocations: length createByteBuf writeInt length writeCharSequence readInt read assertNotNull assertTrue assertThat toString is assertThat readerIndex is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertRead()
focal_class.file: shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/command/query/binary/bind/protocol/PostgreSQLUnspecifiedBinaryProtocolValue.java
focal_class.identifier: PostgreSQLUnspecifiedBinaryProtocolValue
focal_class.interfaces: implements PostgreSQLBinaryProtocolValue
focal_class.class_method_signature: PostgreSQLUnspecifiedBinaryProtocolValue.getColumnLength(final Object value)
focal_class.full_signature: @Override public int getColumnLength(final Object value)
focal_class.identifier: getColumnLength
focal_class.modifiers: @Override public
focal_class.parameters: (final Object value)
focal_class.return: int
focal_class.signature: int getColumnLength(final Object value)
focal_class.class_method_signature: PostgreSQLUnspecifiedBinaryProtocolValue.read(final PostgreSQLPacketPayload payload)
focal_class.full_signature: @Override public Object read(final PostgreSQLPacketPayload payload)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (final PostgreSQLPacketPayload payload)
focal_class.return: Object
focal_class.signature: Object read(final PostgreSQLPacketPayload payload)
focal_class.class_method_signature: PostgreSQLUnspecifiedBinaryProtocolValue.write(final PostgreSQLPacketPayload payload, final Object value)
focal_class.full_signature: @Override public void write(final PostgreSQLPacketPayload payload, final Object value)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (final PostgreSQLPacketPayload payload, final Object value)
focal_class.return: void
focal_class.signature: void write(final PostgreSQLPacketPayload payload, final Object value)
focal_method.body: @Override
      public Object read(final PostgreSQLPacketPayload payload) {
          payload.getByteBuf().readerIndex(payload.getByteBuf().readerIndex() - 4);
          byte[] bytes = new byte[payload.readInt4()];
          payload.getByteBuf().readBytes(bytes);
          String result = new String(bytes);
          return new PostgreSQLTypeUnspecifiedSQLParameter(result);
      }
focal_method.class_method_signature: PostgreSQLUnspecifiedBinaryProtocolValue.read(final PostgreSQLPacketPayload payload)
focal_method.full_signature: @Override public Object read(final PostgreSQLPacketPayload payload)
focal_method.identifier: read
focal_method.invocations: readerIndex getByteBuf readerIndex getByteBuf readInt4 readBytes getByteBuf
focal_method.modifiers: @Override public
focal_method.parameters: (final PostgreSQLPacketPayload payload)
focal_method.return: Object
focal_method.signature: Object read(final PostgreSQLPacketPayload payload)