Tabnine Logo
StringDecoder.decode
Code IndexAdd Tabnine to your IDE (free)

How to use
decode
method
in
org.springframework.core.codec.StringDecoder

Best Java code snippets using org.springframework.core.codec.StringDecoder.decode (Showing top 6 results out of 315)

origin: spring-projects/spring-framework

@Override
public Flux<Object> read(
    ResolvableType elementType, ReactiveHttpInputMessage message, Map<String, Object> hints) {
  boolean shouldWrap = isServerSentEvent(elementType);
  ResolvableType valueType = (shouldWrap ? elementType.getGeneric() : elementType);
  return stringDecoder.decode(message.getBody(), STRING_TYPE, null, hints)
      .bufferUntil(line -> line.equals(""))
      .concatMap(lines -> buildEvent(lines, valueType, shouldWrap, hints));
}
origin: org.springframework/spring-web

@Override
public Flux<Object> read(
    ResolvableType elementType, ReactiveHttpInputMessage message, Map<String, Object> hints) {
  boolean shouldWrap = isServerSentEvent(elementType);
  ResolvableType valueType = (shouldWrap ? elementType.getGeneric() : elementType);
  return stringDecoder.decode(message.getBody(), STRING_TYPE, null, hints)
      .bufferUntil(line -> line.equals(""))
      .concatMap(lines -> buildEvent(lines, valueType, shouldWrap, hints));
}
origin: spring-projects/spring-framework

@Override
protected void testDecodeError(Publisher<DataBuffer> input, ResolvableType outputType,
    @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) {
  input = Flux.concat(
      Flux.from(input).take(1),
      Flux.error(new InputException()));
  Flux<String> result = this.decoder.decode(input, outputType, mimeType, hints);
  StepVerifier.create(result)
      .expectError(InputException.class)
      .verify();
}
origin: spring-projects/spring-framework

@Test
public void decodeEmptyDataBuffer() {
  Flux<DataBuffer> input = Flux.just(stringBuffer(""));
  Flux<String> output = this.decoder.decode(input,
      TYPE, null, Collections.emptyMap());
  StepVerifier.create(output)
      .expectNext("")
      .expectComplete().verify();
}
origin: apache/servicemix-bundles

@Override
public Flux<Object> read(ResolvableType elementType, ReactiveHttpInputMessage message,
    Map<String, Object> hints) {
  boolean shouldWrap = isServerSentEvent(elementType);
  ResolvableType valueType = (shouldWrap ? elementType.getGeneric() : elementType);
  return stringDecoder.decode(message.getBody(), STRING_TYPE, null, Collections.emptyMap())
      .bufferUntil(line -> line.equals(""))
      .concatMap(lines -> buildEvent(lines, valueType, shouldWrap, hints));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web

@Override
public Flux<Object> read(
    ResolvableType elementType, ReactiveHttpInputMessage message, Map<String, Object> hints) {
  boolean shouldWrap = isServerSentEvent(elementType);
  ResolvableType valueType = (shouldWrap ? elementType.getGeneric() : elementType);
  return stringDecoder.decode(message.getBody(), STRING_TYPE, null, hints)
      .bufferUntil(line -> line.equals(""))
      .concatMap(lines -> buildEvent(lines, valueType, shouldWrap, hints));
}
org.springframework.core.codecStringDecoderdecode

Popular methods of StringDecoder

  • allMimeTypes
    Create a StringDecoder that supports all MIME types.
  • textPlainOnly
    Create a StringDecoder for "text/plain".
  • <init>
  • decodeToMono
  • getCharset
  • getDelimiterBytes
  • indexOf
    Find the given delimiter in the given data buffer.
  • isEndFrame
    Check whether the given buffer is #END_FRAME.
  • splitOnDelimiter
    Split the given data buffer on delimiter boundaries. The returned Flux contains an #END_FRAME buffer
  • canDecode

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now