Capture interface specific information and write it to the provided writer.

@param networkInterface the interface to introspect
@param writer the print writer to write information to
975626
private void getInterfaceInfo(NetworkInterface networkInterface, PrintWriter out) throws IOException {
        final String indent = "    ";

        // Basic information from the interface
        out.println();
        out.append("Interface: ").append(networkInterface.getDisplayName()).println();
        out.append(indent).append("          loopback: ").append(Boolean.toString(networkInterface.isLoopback())).println();
        out.append(indent).append("               mtu: ").append(Integer.toString(networkInterface.getMTU())).println();
        out.append(indent).append("    point-to-point: ").append(Boolean.toString(networkInterface.isPointToPoint())).println();
        out.append(indent).append("supports multicast: ").append(Boolean.toString(networkInterface.supportsMulticast())).println();
        out.append(indent).append("                up: ").append(Boolean.toString(networkInterface.isUp())).println();
        out.append(indent).append("           virtual: ").append(Boolean.toString(networkInterface.isVirtual())).println();

        // Interface address information
        List<InterfaceAddress> intfAddresses = networkInterface.getInterfaceAddresses();
        for (int i = 0; i < intfAddresses.size(); i++) {
            out.append(indent).append("InterfaceAddress #").append(Integer.toString(i + 1)).append(": ").append(String.valueOf(intfAddresses.get(i))).println();
        }

        // Network interface information
        Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
        for (int i = 1; inetAddresses.hasMoreElements(); i++) {
            InetAddress inetAddress = inetAddresses.nextElement();
            out.append(indent).append("InetAddress #").append(Integer.toString(i)).println(":");
            out.append(indent).append(indent).append("    IP address: ").append(inetAddress.getHostAddress()).println();
            out.append(indent).append(indent).append("     host name: ").append(inetAddress.getHostName()).println();
            out.append(indent).append(indent).append("FQDN host name: ").append(inetAddress.getCanonicalHostName()).println();
        }
    }
559074
@Override
    public void writeExternal(PofWriter writer) throws IOException {
        writer.writeString(0, nodeName);
        writer.writeString(1, namespace);
    }
811122
public static void write(final BedRecord record, final PrintWriter writer) {
        checkNotNull(record);
        checkNotNull(writer);
        writer.println(record.toString());
    }
84970
public function write(WriterInterface $writer)
    {
        try {
            if (strlen($category = $this->getConfig()->get(FormatterInterface::CFG_EXPORT_TABLE_CATEGORY)) && 
                $this->getCategory() != $category) {
                $status = 'skipped, not in category';
            } else {
                switch ($this->writeTable($writer)) {
                    case self::WRITE_OK:
                        $status = 'OK';
                        break;

                    case self::WRITE_EXTERNAL:
                        $status = 'skipped, marked as external';
                        break;

                    case self::WRITE_M2M:
                        $status = 'skipped, M2M table';
                        break;

                    default:
                        $status = 'unsupported';
                        break;
                }
            }
            $this->getDocument()->addLog(sprintf('* %s: %s', $this->getRawTableName(), $status));
        } catch (\Exception $e) {
            $this->getDocument()->addLog(sprintf('* %s: ERROR', $this->getRawTableName()));
            throw $e;
        }

        return $this;
    }
711939
public void setNetworkInterfaces(java.util.Collection<NetworkInterface> networkInterfaces) {
        if (networkInterfaces == null) {
            this.networkInterfaces = null;
            return;
        }

        this.networkInterfaces = new java.util.ArrayList<NetworkInterface>(networkInterfaces);
    }
225791
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    writer.newLine();
    writer.taggedValue("remoteMEUuid", remoteMEUuid);
    writer.newLine();
    writer.taggedValue("streamID", streamID);
    writer.newLine();
    writer.taggedValue("initialData", initialData);
    writer.newLine();
    writer.taggedValue("type", type);
  }
1100890
public function write(WriterInterface $writer)
    {
        foreach ($this->childs as $table) {
            $table->write($writer);
        }

        return $this;
    }
721600
protected void write(Writer writer, WritingVisitor visitor) throws IOException {
      if( isNullObject() ){
         writer.write(JSONNull.getInstance().toString());
      }

      boolean b = false;
      Iterator keys = visitor.keySet(this).iterator();
      writer.write('{');

      while( keys.hasNext() ){
         if( b ){
            writer.write(',');
         }
         Object k = keys.next();
         writer.write(JSONUtils.quote(k.toString()));
         writer.write(':');
         Object v = this.properties.get(k);
         if( v instanceof JSON ){
            visitor.on((JSON) v, writer);
         }else{
            visitor.on(v, writer);
         }
         b = true;
      }
      writer.write('}');
   }
838933
public function getWriter(int $writer = Output::STANDARD): WriterInterface
	{
		return ($writer === static::STANDARD) ? $this->standard : $this->error;
	}
1144598
public Writer writeTo(final Writer out) throws IOException {
        if (this.out!=null) {
            // StackOverflow prevention
            return NullWriter.DEFAULT;
        }
        try {
            this.out = createWriter(out);
            run();
            return out;
        } finally {
            if (this.out!=null) {
                this.out.flush();
            }
            this.out = null;
        }
    }
715154
@Override
    public void write(DataWriter writer) throws IOException {
        writer.writeInt(pos);  /* array position */
        writer.writeInt(val);  /* data value */
        writer.writeLong(scn); /* SCN value */
    }
93849
public void write(Writer writer) throws IOException {
    final Properties properties = new Properties();

    for (Map.Entry<DictionaryAttribute, String> e : getAttributes().entrySet()) {
      properties.setProperty(e.getKey().propertyName, e.getValue());
    }

    properties.store(writer, "# " + getClass().getName());
  }
685052
public static void writeLine(BufferedWriter writer, String line) throws IOException {
        writer.write(line);
        writer.newLine();
    }
519290
public function writeGetArrayCopy(WriterInterface $writer)
    {
        $columns   = $this->getColumns();
        $relations = $this->getTableRelations();

        $writer
            ->write('/**')
            ->write(' * Return a array with all fields and data.')
            ->write(' * Default the relations will be ignored.')
            ->write(' * ')
            ->write(' * @param array $fields')
            ->write(' * @return array')
            ->write(' */')
            ->write('public function getArrayCopy(array $fields = array())')
            ->write('{')
            ->indent()
                ->write('$dataFields = array(%s);', implode(', ', array_map(function($column) {
                    return sprintf('\'%s\'', $column);
                }, $columns->getColumnNames())))
                ->write('$relationFields = array(%s);', implode(', ', array_map(function($relation) {
                    return sprintf('\'%s\'', lcfirst($relation->getReferencedTable()->getModelName()));
                }, $relations)))
                ->write('$copiedFields = array();')
                ->write('foreach ($relationFields as $relationField) {')
                ->indent()
                    ->write('$map = null;')
                    ->write('if (array_key_exists($relationField, $fields)) {')
                    ->indent()
                        ->write('$map = $fields[$relationField];')
                        ->write('$fields[] = $relationField;')
                        ->write('unset($fields[$relationField]);')
                    ->outdent()
                    ->write('}')
                    ->write('if (!in_array($relationField, $fields)) {')
                    ->indent()
                        ->write('continue;')
                    ->outdent()
                    ->write('}')
                    ->write('$getter = sprintf(\'get%s\', ucfirst(str_replace(\' \', \'\', ucwords(str_replace(\'_\', \' \', $relationField)))));')
                    ->write('$relationEntity = $this->{$getter}();')
                    ->write('$copiedFields[$relationField] = (!is_null($map))')
                    ->indent()
                        ->write('? $relationEntity->getArrayCopy($map)')
                        ->write(': $relationEntity->getArrayCopy();')
                    ->outdent()
                    ->write('$fields = array_diff($fields, array($relationField));')
                ->outdent()
                ->write('}')
                ->write('foreach ($dataFields as $dataField) {')
                ->indent()
                    ->write('if (!in_array($dataField, $fields) && !empty($fields)) {')
                    ->indent()
                        ->write('continue;')
                    ->outdent()
                    ->write('}')
                    ->write('$getter = sprintf(\'get%s\', ucfirst(str_replace(\' \', \'\', ucwords(str_replace(\'_\', \' \', $dataField)))));')
                    ->write('$copiedFields[$dataField] = $this->{$getter}();')
                ->outdent()
                ->write('}')
                ->write('')
                ->write('return $copiedFields;')
            ->outdent()
            ->write('}')
            ->write('')
        ;

        return $this;
    }
558308
public static void copy(InputStream in, Writer writer) throws IOException {
    copy(getInputStreamReader(in), writer);
    writer.flush();
  }
399416
public function write(WriterInterface $writer)
    {
        foreach ($this->childs as $column) {
            $column->write($writer);
        }

        return $this;
    }
1261998
protected void writeBlock(Writer writer, String header, 
			String block) throws IOException {
		writeBlock(writer, null, header, block);
	}