public static <A extends Appendable> A appendHexDigits(A target, int value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexDigits(A target, long value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexDigits(A target, int value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexDigits(A target, long value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexDigits(A target, long value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static <A extends Appendable> A appendHexDigits(A target, int value) { try{ return (A) appendHexDigitsRaw(target.append("0x"), value); } catch (IOException ex) { throw new RuntimeException(ex); } }
private void writeChunkPrefix(NetResponseWriter outputStream, int headerBlobPosition, long positionOfLen, int len) { //logger.trace("writing chunk at position {} ", headerBlobPosition); DataOutputBlobWriter.openFieldAtPosition(outputStream, headerBlobPosition); //since block has return on the end we must subtract 2 from what we wrote final int adj = 2+(5*(1&(context>>ServerCoordinator.END_RESPONSE_SHIFT))); Appendables.appendHexDigitsRaw(outputStream, len-adj); outputStream.write(RETURN_NEWLINE); int propperLength = DataOutputBlobWriter.length(outputStream); Pipe.validateVarLength(outputStream.getPipe(), propperLength); Pipe.setIntValue(propperLength, outputStream.getPipe(), positionOfLen); //go back and set the right length. outputStream.getPipe().closeBlobFieldWrite(); }
Appendables.appendHexDigitsRaw(outputStream, 0); outputStream.write(HTTPUtil.RETURN_NEWLINE);
Appendables.appendHexDigitsRaw(writer, chunkSize); writer.write(RETURN_NEWLINE);