Examples of TransactionAwareBufferedWriter


Examples of org.springframework.batch.support.transaction.TransactionAwareBufferedWriter

     */
    private Writer getBufferedWriter(FileChannel fileChannel, String encoding) {
      try {
        final FileChannel channel = fileChannel;
        if (transactional) {
          TransactionAwareBufferedWriter writer = new TransactionAwareBufferedWriter(channel, new Runnable() {
            @Override
            public void run() {
              closeStream();
            }
          });

          writer.setEncoding(encoding);
          writer.setForceSync(forceSync);
          return writer;
        }
        else {
          Writer writer = new BufferedWriter(Channels.newWriter(fileChannel, encoding)) {
            @Override
View Full Code Here

Examples of org.springframework.batch.support.transaction.TransactionAwareBufferedWriter

    }

    try {
      final FileChannel channel = fileChannel;
      if (transactional) {
        TransactionAwareBufferedWriter writer = new TransactionAwareBufferedWriter(channel, new Runnable() {
          @Override
          public void run() {
            closeStream();
          }
        });

        writer.setEncoding(encoding);
        writer.setForceSync(forceSync);
        bufferedWriter = writer;
      }
      else {
        bufferedWriter =  new BufferedWriter(new OutputStreamWriter(os, encoding));
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.