MCPcopy Create free account
hub / github.com/demoth/jake2 / fwriteString

Method fwriteString

qcommon/src/main/java/jake2/qcommon/util/Lib.java:199–210  ·  view source on GitHub ↗

Like in libc.

(String s, int len, RandomAccessFile f)

Source from the content-addressed store, hash-verified

197
198 /** Like in libc. */
199 public static void fwriteString(String s, int len, RandomAccessFile f) throws IOException {
200 if (s == null)
201 return;
202 int diff = len - s.length();
203 if (diff > 0) {
204 f.write(stringToBytes(s));
205
206 f.write(nullfiller, 0, diff);
207 }
208 else
209 f.write(stringToBytes(s), 0, len);
210 }
211
212 /** Like in libc */
213 public static RandomAccessFile fopen(String name, String mode) {

Callers

nothing calls this directly

Calls 2

stringToBytesMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected