/*
(non-Javadoc)

@see javax.servlet.ServletRequest#setCharacterEncoding(java.lang.String)
500800
@Override
    public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
        try {
            collaborator.preInvoke(componentMetaData);
            request.setCharacterEncoding(arg0);
        } finally {
            collaborator.postInvoke();
        }

    }
1113843
public void setCharacterEncoding(String enc) {		
		try {			
			this.message.setContentEncoding(SipFactoryImpl.headerFactory
					.createContentEncodingHeader(enc));
		} catch (Exception ex) {
			throw new IllegalArgumentException("Encoding " + enc + " not valid", ex);
		}

	}
206039
public void setOutputEncoding(String outputEncoding) {
        this.log("Setting output encoding to " + outputEncoding, LogLevel.DEBUG.getLevel());
        this.outputEncoding = outputEncoding;
    }
281079
public static String encodeString(final String string) {
		String encodedString = null;

		try {
			encodedString = encodeString(string, "UTF-8");
		} catch (UnsupportedEncodingException uue) {
			// Should never happen, java has to support "UTF-8".
		}

		return encodedString;
	}
84886
public void setCharset(final Charset charset) {
        final Charset old = this.charset;

        this.charset = charset;
        this.connectionConfig = System.currentTimeMillis();
        this.connectionValidated = false;

        this.pcs.firePropertyChange("charset", old, this.charset);
    }
54675
public void setEncoding(String encoding)
    throws UnsupportedEncodingException
  {
    String mimeName = Encoding.getMimeName(encoding);

    if (mimeName != null && mimeName.equals(_readEncodingName))
      return;

    _readEncoding = Encoding.getReadEncoding(this, encoding);
    _readEncodingName = mimeName;
  }
245149
public void writeChar(char value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeChar", Character.valueOf(value));
    getBodyList().add(Character.valueOf(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeChar");
  }
1214344
public void setResponseCharacterEncoding(String encoding)
    {
        ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
        
        if (ctx == null)
        {
            throw new UnsupportedOperationException();
        }
        
        ctx.setResponseCharacterEncoding(encoding);
    }
1155359
@Reference(policy=ReferencePolicy.DYNAMIC)
    protected void setEncodingService(EncodingUtils encUtils) {
        encodingServiceRef.set(encUtils);
    }
890633
public void setContentEncoding(String contentEncoding) throws InvalidArgumentException {
    if (Strings.isNullOrEmpty(contentEncoding)) {
      throw new InvalidArgumentException("empty content encoding");
    }

    this.contentEncoding = contentEncoding;
  }
383010
public void setEncoding(String enc) throws IOException {
        if (source != null) //applicapble to URL streams only
        {
            String current = encoding;
            if (current == null)
                current = Charset.defaultCharset().name();
            if (!current.equalsIgnoreCase(enc)) {
                int oldindex = input.index();
                source.close();
                encoding = enc;
                CSSInputStream newstream = urlStream(url, network, encoding);
                input = newstream.input;
                input.seek(oldindex);
            }
        }
    }
514841
@Override
    public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
44897
public static String writeCharacter(Character value) {
		if (value==null) return null;
		
		return Integer.toString((int)value);			
	}
15707
public void writeCharacters(String text) throws XMLStreamException {
		try {
			this.checkPendingATEvents();
			encoder.encodeCharacters(new StringValue(text));
		} catch (Exception e) {
			throw new XMLStreamException(e.getLocalizedMessage(), e);
		}
	}
750473
public boolean setEncoding(String encoding) {
        for(Map.Entry<Byte, String> entry : CODE_PAGE_ENCODING.entrySet()) {
            if(entry.getValue().equalsIgnoreCase(encoding)) {
                this.fileEncoding = entry.getValue();
                return true;
            }
        }
        return false;
    }
273596
public Charset setCharset(Charset charset) {
        Charset prev = this.charset.get();
        this.charset.set(charset);
        return prev;
    }
536617
@Nullable
    public final Charset getEncoding() {
        final String parameter = getParameter(ENCODING);
        if (parameter == null) {
            return null;
        }
        return Charset.forName(parameter);
    }