Write namespace declarations.

@throws IOException Signals that an I/O exception has occurred.
969086
private void writeNamespaceDeclarations() throws IOException {
		// int start = elNamespaceCount[ depth - 1 ];
		for (int i = elNamespaceCount[depth - 1]; i < namespaceEnd; i++) {
			if (doIndent && namespaceUri[i].length() > 40) {
				writeIndent();
				out.write(" ");
			}
			if ("".equals(namespacePrefix[i])) {
				out.write(" xmlns:");
				out.write(namespacePrefix[i]);
				out.write('=');
			} else {
				out.write(" xmlns=");
			}
			out.write(attributeUseApostrophe ? '\'' : '"');

			// NOTE: escaping of namespace value the same way as attributes!!!!
			writeAttributeValue(namespaceUri[i], out);

			out.write(attributeUseApostrophe ? '\'' : '"');
		}
	}
715269
public void write(Writer out)
         throws IOException
    {
        out.write("<dl"+attributes()+">");

        if (terms.size() != defs.size())
            throw new Error("mismatched Vector sizes");

        for (int i=0; i <terms.size() ; i++)
        {
            out.write("<dt>");
            ((Element)terms.elementAt(i)).write(out);
            out.write("</dt><dd>");
            ((Element)defs.elementAt(i)).write(out);
            out.write("</dd>");
        }

        out.write("</dl>");
    }
999630
void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_INTEGER);
    out.writeInt(_value);
  }
133767
public void indent() throws IOException {
        for (int i=0; i<indent; i++) writeRawString("   ");
    }

    /**
     * Method to increase the indent depth of the output writer.
     * @throws IOException Thrown if an error occurs during write.
     */
    public void indentPush()
    {
        indent++;
    }

    /**
     * Method to reduce the indent depth of the output writer.
     */
    public void indentPop()
    {
        indent--;
        if (indent < 0) throw new IllegalStateException();
    }

    /**
     * Method to get a list of all the property names stored in a map.
     */
    public List getPropertyNames(Map map)
    {
        List propertyNames = super.getPropertyNames(map);

        Collections.sort(propertyNames);

        return propertyNames;
    }

}
284552
@Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeBoolean(isLeaf);
    out.writeInt(numEntries);
    // Entries will be written in subclasses
  }
78819
@Override
    public void writeNamespace(String prefix, String nsURI) throws XMLStreamException
    {
        if (prefix == null || prefix.length() == 0) {
            writeDefaultNamespace(nsURI);
            return;
        }
        if (!mNsAware) {
            throwOutputError("Can not write namespaces with non-namespace writer.");
        }
        outputAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", prefix, nsURI);
        mCurrElem.addPrefix(prefix, nsURI);
    }
1087685
public void writeDefinition(final OutputStream result) throws IOException
    {
        result.write(ANSI);
        result.write(ANSI_CODEPAGE);
        result.write(intToByteArray(1252));
        this.document.outputDebugLinebreak(result);    	
    }
1038782
private void writeObject(ObjectOutputStream out) throws IOException {
        ClassRef.write(out, type);
        out.writeUTF(name);
        out.writeObject(val);
    }
972796
public void write(DataOutput out) throws IOException {
    WritableUtils.writeVInt(out, splits.length);
    for (InputSplit s : splits) {
      Text.writeString(out, s.getClass().getName());
    }
    for (InputSplit s : splits) {
      s.write(out);
    }
  }
676970
public void write(final Writer outputWriter) throws IOException {
    try (final DataInputStream keyStream = entry.getKeyStream();
         final DataInputStream valueStream = entry.getValueStream();) {
      outputWriter.write("Container: ");
      outputWriter.write(keyStream.readUTF());
      outputWriter.write("\n");
      this.writeFiles(valueStream, outputWriter);
    }
  }
303852
void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_UTF8);
    out.writeUTF8(_value);
  }
849463
@Override
    public void outputNamespaceDeclarations(Writer w) throws IOException
    {
        String[] ns = mNamespaces;
        for (int i = mFirstLocalNs, len = mNsLength; i < len; i += 2) {
            w.write(' ');
            w.write(XMLConstants.XMLNS_ATTRIBUTE);
            String prefix = ns[i];
            if (prefix != null && prefix.length() > 0) {
                w.write(':');
                w.write(prefix);
            }
            w.write("=\"");
            w.write(ns[i+1]);
            w.write('"');
        }
    }
961730
public void writeObject(Object o) throws IOException {
        ObjectOutputStream oos = AnonymousClassWarnings.checkingObjectOutputStream(out);
        oos.writeObject(o);
        // don't close oss, which will close the underlying stream
        // no need to flush either, given the way oos is implemented
    }
481319
public void writer() throws IOException {
    // [START writer]
    byte[] content = "Hello, World!".getBytes(UTF_8);
    try (WriteChannel writer = blob.writer()) {
      try {
        writer.write(ByteBuffer.wrap(content, 0, content.length));
      } catch (Exception ex) {
        // handle exception
      }
    }
    // [END writer]
  }
143649
public void writeNameValuePair(String name, long value) throws IOException
   {
      internalWriteNameValuePair(name, Long.toString(value));
   }
282504
public void write(ByteCodeWriter out)
    throws IOException
  {
    out.writeUTF8Const(getName());

    TempOutputStream ts = new TempOutputStream();
    //ts.openWrite();
    //WriteStream ws = new WriteStream(ts);
    ByteCodeWriter o2 = new ByteCodeWriter(ts, out.getJavaClass());

    o2.writeShort(_exceptions.size());
    for (int i = 0; i < _exceptions.size(); i++) {
      String exn = _exceptions.get(i);

      o2.writeClass(exn);
    }
    
    ts.close();
    
    out.writeInt(ts.getLength());
    
    TempBuffer ptr = ts.getHead();

    for (; ptr != null; ptr = ptr.next())
      out.write(ptr.buffer(), 0, ptr.length());

    ts.destroy();
  }
1369425
private void writePrefixDeclaration(BufferedWriter writer) throws IOException {
        final ImmutableMap<String, String> prefixMap = ppMapping.getMetadata().getPrefixManager().getPrefixMap();

        if (prefixMap.size() == 0) {
            return; // do nothing if there is no prefixes to write
        }

        writer.write(OntopNativeMappingParser.PREFIX_DECLARATION_TAG);
        writer.write("\n");
        for (String prefix : prefixMap.keySet()) {
            String uri = prefixMap.get(prefix);
            writer.write(prefix + (prefix.length() >= 9 ? "\t" : "\t\t") + uri + "\n");
        }
        writer.write("\n");
    }