@Override public Flux<DataBuffer> content() { byte[] bytes = this.content.getBytes(getCharset()); DataBuffer buffer = getBufferFactory().allocateBuffer(bytes.length); buffer.write(bytes); return Flux.just(buffer); }
private Charset getCharset() { String name = MultipartUtils.getCharEncoding(headers()); return (name != null ? Charset.forName(name) : StandardCharsets.UTF_8); }
private Part createPart(StreamStorage storage, HttpHeaders httpHeaders) { String filename = MultipartUtils.getFileName(httpHeaders); if (filename != null) { return new SynchronossFilePart(httpHeaders, filename, storage, this.bufferFactory); } else if (MultipartUtils.isFormField(httpHeaders, this.context)) { String value = MultipartUtils.readFormParameterValue(storage, httpHeaders); return new SynchronossFormFieldPart(httpHeaders, this.bufferFactory, value); } else { return new SynchronossPart(httpHeaders, storage, this.bufferFactory); } }
private Charset getCharset() { String name = MultipartUtils.getCharEncoding(headers()); return (name != null ? Charset.forName(name) : StandardCharsets.UTF_8); }
@Override public Flux<DataBuffer> content() { byte[] bytes = this.content.getBytes(getCharset()); DataBuffer buffer = getBufferFactory().allocateBuffer(bytes.length); buffer.write(bytes); return Flux.just(buffer); }
@Override public String toString() { return "Part '" + name() + "=" + this.content + "'"; } }
private Part createPart(StreamStorage storage, HttpHeaders httpHeaders) { String filename = MultipartUtils.getFileName(httpHeaders); if (filename != null) { return new SynchronossFilePart(httpHeaders, filename, storage, this.bufferFactory); } else if (MultipartUtils.isFormField(httpHeaders, this.context)) { String value = MultipartUtils.readFormParameterValue(storage, httpHeaders); return new SynchronossFormFieldPart(httpHeaders, this.bufferFactory, value); } else { return new SynchronossPart(httpHeaders, storage, this.bufferFactory); } }
private Charset getCharset() { String name = MultipartUtils.getCharEncoding(headers()); return (name != null ? Charset.forName(name) : StandardCharsets.UTF_8); } }
@Override public Flux<DataBuffer> content() { byte[] bytes = this.content.getBytes(getCharset()); DataBuffer buffer = getBufferFactory().allocateBuffer(bytes.length); buffer.write(bytes); return Flux.just(buffer); }
private Part createPart(StreamStorage storage, HttpHeaders httpHeaders) { String filename = MultipartUtils.getFileName(httpHeaders); if (filename != null) { return new SynchronossFilePart(httpHeaders, filename, storage, this.bufferFactory); } else if (MultipartUtils.isFormField(httpHeaders, this.context)) { String value = MultipartUtils.readFormParameterValue(storage, httpHeaders); return new SynchronossFormFieldPart(httpHeaders, this.bufferFactory, value); } else { return new SynchronossPart(httpHeaders, storage, this.bufferFactory); } }
@Override public String toString() { return "Part '" + name() + "=" + this.content + "'"; } }
private Charset getCharset() { String name = MultipartUtils.getCharEncoding(headers()); return (name != null ? Charset.forName(name) : StandardCharsets.UTF_8); }
private Part createPart(StreamStorage storage, HttpHeaders httpHeaders) { String filename = MultipartUtils.getFileName(httpHeaders); if (filename != null) { return new SynchronossFilePart(httpHeaders, filename, storage, this.bufferFactory); } else if (MultipartUtils.isFormField(httpHeaders, this.context)) { String value = MultipartUtils.readFormParameterValue(storage, httpHeaders); return new SynchronossFormFieldPart(httpHeaders, this.bufferFactory, value); } else { return new SynchronossPart(httpHeaders, storage, this.bufferFactory); } }
@Override public String toString() { return "Part '" + name() + "=" + this.content + "'"; } }
@Override public Flux<DataBuffer> content() { byte[] bytes = this.content.getBytes(getCharset()); DataBuffer buffer = getBufferFactory().allocateBuffer(bytes.length); buffer.write(bytes); return Flux.just(buffer); }