MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / writeChars

Method writeChars

ij/src/main/java/ij/io/TiffEncoder.java:539–554  ·  view source on GitHub ↗
(OutputStream out, String s)

Source from the content-addressed store, hash-verified

537 }
538
539 final void writeChars(OutputStream out, String s) throws IOException {
540 int len = s.length();
541 if (littleEndian) {
542 for (int i = 0 ; i < len ; i++) {
543 int v = s.charAt(i);
544 out.write(v&255);
545 out.write((v>>>8)&255);
546 }
547 } else {
548 for (int i = 0 ; i < len ; i++) {
549 int v = s.charAt(i);
550 out.write((v>>>8)&255);
551 out.write(v&255);
552 }
553 }
554 }
555
556}

Callers 1

writeMetaDataMethod · 0.95

Calls 3

charAtMethod · 0.80
lengthMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected