Codota Logo
Inputs
Code IndexAdd Codota to your IDE (free)

How to use
Inputs
in
org.qi4j.io

Best Java code snippets using org.qi4j.io.Inputs (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.qi4j.library/org.qi4j.library.eventsourcing

  @Override
  public void run()
  {
    synchronized (listeners)
    {
      Input<TransactionApplicationEvents, RuntimeException> input = Inputs.iterable( Collections.singleton( transactionDomain ) );
      for (Output<TransactionApplicationEvents, ? extends Throwable> listener : listeners)
      {
        try
        {
          input.transferTo( listener );
        } catch (Throwable e)
        {
          logger.warn( "Could not notify event listener", e );
        }
      }
    }
  }
} );
origin: org.qi4j.core/org.qi4j.core.io

/**
 * Read lines from a UTF-8 encoded textfile.
 *
 * If the filename ends with .gz, then the data is automatically unzipped when read.
 *
 * @param source textfile with lines separated by \n character
 *
 * @return Input that provides lines from the textfiles as strings
 */
public static Input<String, IOException> text( final File source )
// END SNIPPET: method
{
  return text( source, "UTF-8" );
}
origin: org.qi4j.core/org.qi4j.core.testsupport

@Test
public void testIOString()
  throws Exception
{
  StringBuilder sb = new StringBuilder();
  iterable( byteCollection() ).transferTo( map( valueSerialization.serialize(), text( sb ) ) );
  String output = sb.toString();
  List<Byte> list = new ArrayList<Byte>();
  text( output ).transferTo( map( valueSerialization.deserialize( Byte.class ), collection( list ) ) );
  assertEquals( byteCollection(), list );
}
origin: org.qi4j.library/org.qi4j.library.eventsourcing

Inputs.iterable( Iterables.iterable( unitOfWorkDomainValue ) ).transferTo( eventOutput );
org.qi4j.ioInputs

Javadoc

Common inputs

Most used methods

  • iterable
    Create an Input that takes its items from the given Iterable.
  • text
    Read lines from a textfile at a given URL. If the content support gzip encoding, then the data is au

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • Path (java.nio.file)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now