Home / Function/ codeLengthBytes() — spring-boot Function Reference

codeLengthBytes() — spring-boot Function Reference

Architecture documentation for the codeLengthBytes() function in PemPrivateKeyParser.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  9ca1290e_f967_9a7a_fd8e_ef40ab6046ff["codeLengthBytes()"]
  e69ae34c_86e4_ffb6_7795_fc369c14c0cb["objectIdentifier()"]
  e69ae34c_86e4_ffb6_7795_fc369c14c0cb -->|calls| 9ca1290e_f967_9a7a_fd8e_ef40ab6046ff
  fe73744f_3e98_68b3_afc8_6dc95cb2682f["integer()"]
  fe73744f_3e98_68b3_afc8_6dc95cb2682f -->|calls| 9ca1290e_f967_9a7a_fd8e_ef40ab6046ff
  26f4d44c_edfe_7944_618c_d4d4936fb5b8["octetString()"]
  26f4d44c_edfe_7944_618c_d4d4936fb5b8 -->|calls| 9ca1290e_f967_9a7a_fd8e_ef40ab6046ff
  f42acbfe_ddab_013c_bbe2_efd83fd777f4["sequence()"]
  f42acbfe_ddab_013c_bbe2_efd83fd777f4 -->|calls| 9ca1290e_f967_9a7a_fd8e_ef40ab6046ff
  7e52cb44_3ef5_cd5e_26a2_ed146f8c2ba3["toByteArray()"]
  9ca1290e_f967_9a7a_fd8e_ef40ab6046ff -->|calls| 7e52cb44_3ef5_cd5e_26a2_ed146f8c2ba3
  style 9ca1290e_f967_9a7a_fd8e_ef40ab6046ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/PemPrivateKeyParser.java lines 300–321

		void codeLengthBytes(int code, byte @Nullable [] bytes) throws IOException {
			this.stream.write(code);
			int length = (bytes != null) ? bytes.length : 0;
			if (length <= 127) {
				this.stream.write(length & 0xFF);
			}
			else {
				ByteArrayOutputStream lengthStream = new ByteArrayOutputStream();
				while (length != 0) {
					lengthStream.write(length & 0xFF);
					length = length >> 8;
				}
				byte[] lengthBytes = lengthStream.toByteArray();
				this.stream.write(0x80 | lengthBytes.length);
				for (int i = lengthBytes.length - 1; i >= 0; i--) {
					this.stream.write(lengthBytes[i]);
				}
			}
			if (bytes != null) {
				this.stream.write(bytes);
			}
		}

Subdomains

Frequently Asked Questions

What does codeLengthBytes() do?
codeLengthBytes() is a function in the spring-boot codebase.
What does codeLengthBytes() call?
codeLengthBytes() calls 1 function(s): toByteArray.
What calls codeLengthBytes()?
codeLengthBytes() is called by 4 function(s): integer, objectIdentifier, octetString, sequence.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free