public ErrorResponseWriter errorMessage(String errorMessage) { this.errorMessage = getBytes(errorMessage); return this; }
public static byte[] getBytes(final String value) { return getBytes(value, DEFAULT_CHARSET); }
public ErrorResponseWriter errorMessage(String errorMessage) { this.errorMessage = getBytes(errorMessage); return this; }
public static byte[] getBytes(final String value) { return getBytes(value, DEFAULT_CHARSET); }
public ErrorResponseWriter errorMessage(String errorMessage, Object... args) { this.errorMessage = getBytes(format(errorMessage, args)); return this; }
public ErrorResponseWriter errorMessage(String errorMessage, Object... args) { this.errorMessage = getBytes(format(errorMessage, args)); return this; }
public static void write(final File file, final String data) throws IOException { try (FileOutputStream os = new FileOutputStream(file)) { os.write(getBytes(data)); } }
public static void write(final File file, final String data) throws IOException { try (FileOutputStream os = new FileOutputStream(file)) { os.write(getBytes(data)); } }
public byte[] convertToMsgPack(String json) { final byte[] jsonBytes = getBytes(json, JSON_CHARSET); final ByteArrayInputStream inputStream = new ByteArrayInputStream(jsonBytes); return convertToMsgPack(inputStream); }
public void setValue(final String value) { this.value.wrap(getBytes(value)); this.isSet = true; }
public SocketAddress host(final String host) { final byte[] hostBytes = getBytes(host); return host(hostBytes, 0, hostBytes.length); }
public SocketAddress host(final String host) { final byte[] hostBytes = getBytes(host); return host(hostBytes, 0, hostBytes.length); }
public void setValue(final String value) { this.value.wrap(getBytes(value)); this.isSet = true; }
public static DirectBuffer wrapString(String argument) { return new UnsafeBuffer(getBytes(argument)); }
public static DirectBuffer wrapString(String argument) { return new UnsafeBuffer(getBytes(argument)); }
protected void writeChecksumFile(final byte[] checksum) throws Exception { Files.createFile(checksumFile.toPath()); try (FileOutputStream checksumFileOutputStream = new FileOutputStream(checksumFile); BufferedOutputStream checksumOutputStream = new BufferedOutputStream(checksumFileOutputStream)) { final String checksumHex = BitUtil.toHex(checksum); final String checksumFileContents = config.checksumContent(checksumHex, getDataFileName()); checksumOutputStream.write(getBytes(checksumFileContents)); } }
protected void writeChecksumFile(final byte[] checksum) throws Exception { Files.createFile(checksumFile.toPath()); try (FileOutputStream checksumFileOutputStream = new FileOutputStream(checksumFile); BufferedOutputStream checksumOutputStream = new BufferedOutputStream(checksumFileOutputStream)) { final String checksumHex = BitUtil.toHex(checksum); final String checksumFileContents = config.checksumContent(checksumHex, getDataFileName()); checksumOutputStream.write(getBytes(checksumFileContents)); } }