Gets the RecordWriter from the wrapped FileOutputFormat.
487721
@Override
  public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
      throws IOException, InterruptedException {
    Configuration conf = context.getConfiguration();
    return getDelegate(conf).getRecordWriter(context);
  }
1342946
public String getFormattedRecord(RepositoryLogRecord record, Locale locale) {
		StringBuilder sb = new StringBuilder(300);

		//create opening tag for the CBE Event
		createEventOTag(sb, record, locale);
		
		//add the CBE elements
		createExtendedElement(sb, record);
		createExtendedElement(sb, "CommonBaseEventLogRecord:sequenceNumber", "long", String.valueOf(record.getSequence()));
		createExtendedElement(sb, "CommonBaseEventLogRecord:threadID", "int", String.valueOf(record.getThreadID()));
		if (record.getLoggerName() != null){
			createExtendedElement(sb, "CommonBaseEventLogRecord:loggerName", "string", record.getLoggerName());
		}

		for (String name: record.getExtensions().keySet()) {
			// Don't report pthreadId here since it is reported as part of the sourceComponentId.
			if (!RepositoryLogRecord.PTHREADID.equals(name)) {
				createExtendedElement(sb, record, name);
			}
		}
		
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_VERSION) != null)
			createExtendedElement(sb, "version", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_VERSION));
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_PROCESSID) != null)
			createExtendedElement(sb, "processId", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_PROCESSID));
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_SERVER_NAME) != null)
			createExtendedElement(sb, "processName", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_SERVER_NAME));

		
		switch (record.getLocalizable()) {
		case WsLogRecord.REQUIRES_LOCALIZATION :
			createExtendedElement(sb, "localizable", "string", STR_REQUIRES_LOCALIZATION);     //yes
			break;
		case WsLogRecord.REQUIRES_NO_LOCALIZATION:
			createExtendedElement(sb, "localizable", "string", STR_REQUIRES_NO_LOCALIZATION);  //no	
			break;
		default :
			createExtendedElement(sb, "localizable", "string", STR_DEFAULT_LOCALIZATION);  //default
		break;  
		}

		createSourceElement(sb, record);
		createMessageElement(sb, record);
		createSituationElement(sb);
		
		//create closing tag for the CBE Event
		createEventCTag(sb);
		
		return sb.toString();
	}
322639
public PrintWriter getWriter()
        throws java.io.IOException 
    {
        if (_outputState==DISABLED)
            return __nullServletWriter;
                                   
        if (_outputState!=NO_OUT && _outputState!=WRITER_OUT)
            throw new IllegalStateException();

        // If we are switching modes, flush output to try avoid overlaps.
        if (_out!=null)
            _out.flush();
        
        /* if there is no writer yet */
        if (_writer==null)
        {
            /* get encoding from Content-Type header */
            String encoding = _httpResponse.getCharacterEncoding();
            
            if (encoding==null)
            {
                if (_servletHttpRequest!=null)
                {
                    /* implementation of educated defaults */
                    String mimeType = _httpResponse.getMimeType();                
                    encoding = _servletHttpRequest.getServletHandler()
                    	.getHttpContext().getEncodingByMimeType(mimeType);
                }
                if (encoding==null)
                    encoding = StringUtil.__ISO_8859_1; 
                _httpResponse.setCharacterEncoding(encoding,true);
            }
            
            /* construct Writer using correct encoding */
            _writer = new ServletWriter(_httpResponse.getOutputStream(), encoding);
        }                    
        _outputState=WRITER_OUT;
        return _writer;
    }
545431
public static Formatter getFormatter()
    {
        Formatter formatter = out.get();
        if (formatter == null)
        {
            formatter = new Formatter(new StringBuilder());
            out.set(formatter);
        }
        else
        {
            StringBuilder sb = (StringBuilder) formatter.out();
            sb.setLength(0);
        }
        return formatter;
    }
1016983
private static synchronized StreamHandler getStreamHandler() {
    if (methodHandler == null) {
      methodHandler = new ConsoleHandler();
      methodHandler.setFormatter(new Formatter() {
        @Override
        public String format(LogRecord record) {
          return record.getMessage() + "\n";
        }
      });
      methodHandler.setLevel(Level.FINE);
    }
    return methodHandler;
  }
1210240
@GwtIncompatible("Unnecessary")
  private Writer fileNameToLegacyOutputWriter(String fileName) throws IOException {
    if (fileName == null) {
      return null;
    }
    if (isInTestMode()) {
      return new StringWriter();
    }

    return streamToLegacyOutputWriter(filenameToOutputStream(fileName));
  }
385128
public Properties getOutputFormat() {
        Properties def = new Properties();
        {
            Set s = getOutputPropDefaultKeys();
            Iterator i = s.iterator();
            while (i.hasNext()) {
                String key = (String) i.next();
                String val = getOutputPropertyDefault(key);
                def.put(key, val);
            }
        }
        
        Properties props = new Properties(def);
        {
            Set s = getOutputPropKeys();
            Iterator i = s.iterator();
            while (i.hasNext()) {
                String key = (String) i.next();
                String val = getOutputPropertyNonDefault(key);
                if (val != null)
                    props.put(key, val);
            }
        }
        return props;
    }
240217
public PrintWriter getErrorWriter() {
    // Defer creating the java.io.PrintWriter until an error needs to be
    // reported.
    if (m_pw == null) {
      m_pw = new PrintWriter(System.err, true);
    }
    return m_pw;
  }
184066
@SuppressWarnings("unchecked")
  public Class<? extends OutputFormat<?,?>> getOutputFormatClass() 
     throws ClassNotFoundException {
    return (Class<? extends OutputFormat<?,?>>) 
      conf.getClass(OUTPUT_FORMAT_CLASS_ATTR, TextOutputFormat.class);
  }
1069222
@Override
    public OutputCommitter getOutputCommitter(TaskAttemptContext taskAttemptContext)
            throws IOException, InterruptedException {
        return new OutputCommitter() {
            @Override
            public void setupJob(JobContext jobContext) throws IOException {
            }

            @Override
            public void cleanupJob(JobContext jobContext) throws IOException {
            }

            @Override
            public void setupTask(TaskAttemptContext taskAttemptContext) throws IOException {
            }

            @Override
            public void commitTask(TaskAttemptContext taskAttemptContext) throws IOException {
            }

            @Override
            public void abortTask(TaskAttemptContext taskAttemptContext) throws IOException {
            }

            @Override
            public boolean needsTaskCommit(TaskAttemptContext taskAttemptContext) throws IOException {
                return false;
            }
        };
    }
247289
public static com.simiacryptus.util.io.MarkdownNotebookOutput get() {
    try {
      final StackTraceElement callingFrame = Thread.currentThread().getStackTrace()[2];
      final String className = callingFrame.getClassName();
      final String methodName = callingFrame.getMethodName();
      @javax.annotation.Nonnull final String fileName = methodName + ".md";
      @javax.annotation.Nonnull File path = new File(Util.mkString(File.separator, "reports", className.replaceAll("\\.", "/").replaceAll("\\$", "/")));
      path = new File(path, fileName);
      path.getParentFile().mkdirs();
      return new com.simiacryptus.util.io.MarkdownNotebookOutput(path, methodName);
    } catch (@javax.annotation.Nonnull final FileNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
996790
def regenerateToOutputFile(outFile, checkNoChanges = false)
      executeRubyComponents
      @pageObject.process
      writeRegeneratedFile(outFile, checkNoChanges, checkNoChanges)
    end
1330375
public OutputStream getOutputStream()
    throws IOException
  {
    if (_os == null)
      _os = new FileOutputStream(_file.getFD());

    return _os;
  }
1287847
public Object getWritable(String fieldName) {
    Object value = getValueMarshaller(fieldName).getWritableObject(struct);
    LOG.debug("Fetched writable {}={}", fieldName, value);
    return value;
  }
585740
protected PrintWriter wrapWriter(OutputStream o) throws Util.Exit {
        try {
            return new PrintWriter(new OutputStreamWriter(o, "ISO8859_1"), true);
        } catch (UnsupportedEncodingException use) {
            util.bug("encoding.iso8859_1.not.found");
            return null; /* dead code */
        }
    }
718978
public String getOutputAsString() {
		if (stringWriter != null) {
			return stringWriter.toString();
		} else if (outputStream != null) {
			String outputStr = null;

			byte[] bytes = outputStream.getOutput();
			if (bytes != null) {
				try {
					outputStr = new String(bytes, characterEncoding);
				} catch (UnsupportedEncodingException e) {
					outputStr = null;
				}
			}

			return outputStr;
		}

		return null;
	}
605643
@Override
    public synchronized String format(LogRecord record) {
        cachedDate.setTime(record.getMillis());
        final StringBuilder sb = new StringBuilder();
        sb.append(cachedFormat.format(cachedDate));
        sb.append(" [").append(Thread.currentThread().getName()).append("]");
        sb.append(" ").append(record.getLevel().getName());
        sb.append(" (");
        final String className = record.getSourceClassName();
        if (className != null) {
            if (className.contains(".")) {
                sb.append(className.substring(className.lastIndexOf(".") + ".".length()));
            } else {
                sb.append(className);
            }
            final String methodName = record.getSourceMethodName();
            if (methodName != null) {
                sb.append("@").append(methodName).append("()");
            }
        } else {
            sb.append(record.getLoggerName());
        }
        sb.append(") - ").append(formatMessage(record));
        final Throwable thrown = record.getThrown();
        if (thrown != null) {
            final StringWriter stringWriter = new StringWriter();
            final PrintWriter printWriter = new PrintWriter(stringWriter);
            try {
                printWriter.println();
                thrown.printStackTrace(printWriter);
            } finally {
                printWriter.close();
            }
            sb.append(stringWriter.toString());
        }
        sb.append("\n");
        return sb.toString();
    }