Prints a string or converts bytes to a string and then prints.
516886
def print_bytes(byte_str):
    """"""
    if isinstance(byte_str, str):
        print(byte_str)
    else:
        print(str(byte_str, encoding='utf8'))
1274066
def print_data(data):
    
    print(", ".join(["{}=>{}".format(key, value) for key, value in data]))
698857
def _println(self, *args):
        ''''''
        string = ' '.join([str(arg) for arg in args])
        print(string, file=self._stream)
696285
public void println(String s) throws IOException
  {
    if(s!=null) {
        this.output.write(s.getBytes(), 0, s.length());
    }
    this.output.write(CRLF, 0, 2);
  }
906763
public void print(String s) throws IOException
	{
		//PK89810, If WCCustomProperties.FINISH_RESPONSE_ON_CLOSE is set and stream is already obtained and closed. 
		// We will not allow user to print more data if the above case is met, outputstreamClosed will be true and default is false.
		if (!(WCCustomProperties.FINISH_RESPONSE_ON_CLOSE) || !outputstreamClosed ) //PK89810
		{
		if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
			logger.logp(Level.FINE, CLASS_NAME,"print", "print --> "+s);
                }
                if(s != null) {  // PQ88872
                    if (!_hasWritten && obs != null)
                    {
                            _hasWritten = true;
            			if (obsList!=null){
            				for (int i=0;i<obsList.size();i++){
            					obsList.get(i).alertFirstWrite();
            				}
            			}
            			else {
                            obs.alertFirstWrite();
                    }
            		}
			int len = s.length();
			if (limit > -1)
			{
				if (total + len > limit)
				{
					len = limit - total;
					except = new WriteBeyondContentLengthException();
				}
			}
			if(this.getBufferSize() != 0){		 // PM44112 
					int off = 0;
					while (len > 0)
					{
						int n = buf.length - count;
						if (n == 0)
						{
							response.setFlushMode(false);
							flushBytes();
							response.setFlushMode(true);
							n = buf.length - count;
						}
						if (n > len)
						{
							n = len;
						}
						//
						// NOTE:  this getBytes call is deprecated ... it doesn't work
						// correctly for multibyte characters, and doesn't take account
						// of the character encoding that the client expects.
						//
						s.getBytes(off, off + n, buf, count);
						
						count += n;
						total += n;
						off += n;
						len -= n;
					}
				} // PM44112 Start
				else if(getBufferSize() == 0) {	
					
					byte[] origBuf=buf; // store the original buff , which is 0
					buf = s.getBytes();	// update buf with the String to print.
					count = buf.length;
					total+=count; // keep the count and the total written
					
					if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
						logger.logp(Level.FINE, CLASS_NAME,"print",  "response Buffersize is set to zero , to print --> "+ count +" total -->"+  total);
					
					
					response.setFlushMode(true);
					flushBytes();				
					buf=origBuf; // set it back to original buff, i.e. 0 value
					
					if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
						logger.logp(Level.FINE, CLASS_NAME,"print",  "after flushbytes, buf --> "+ buf.length +" count --> "+  count+" total -->"+  total);
					
				}// PM44112 End
			check();
		} // PQ88872
	}
		else{//PK89810 start
			if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
				logger.logp(Level.FINE, CLASS_NAME,"print", "print not allowed, outputstreamClosed value --> " + outputstreamClosed);			
		}//PK89810 End
	}
325881
@Override
    public void print(String s) throws IOException {
        //TODO this is wrong for encoding
        byte[] data = (null == s) ? "null".getBytes() : s.getBytes();
        this.output.write(data, 0, data.length);
    }
321522
synchronized void printBuffer() throws IOException { // TODO: is synchronized really needed here?
	int len = sb.length();
	if (len > 0) {
	    char[] chars = new char[len];
	    sb.getChars(0, len, chars, 0);
	    sb.setLength(0);
	    super.write(chars, 0, chars.length);
	}
    }
713895
public void println(String s) throws IOException 
    {
         if (s!=null) write(s.getBytes());     
         write(IO.CRLF_BYTES);
    }
642055
public void print(String value) throws IOException
    {
        if(this._listener!= null &&  !checkIfCalledFromWLonError()){
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "non blocking print String , WriteListener enabled: " + this._listener);
            if(value!=null){
                this.print_NonBlocking(value);
            }            
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "print String");
            super.print(value);
        }
    }
141700
public static void print(byte[] array) {
		String[] name = new String[] { "+0", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8", "+9", "+a", "+b", "+c", "+d", "+e", "+f" };
		for (int i = 0; i < 16; i++) {
			System.out.print(name[i] + " ");
		}
		System.out.println();
		for (int i = 0; i < array.length; i++) {

			if (i != 0 && i % 16 == 0) {
				System.out.println();
			}
			byte b = array[i];

			System.out.print(String.format("%02x", b).toUpperCase() + " ");

		}
		System.out.println();

	}
485413
public void printString(String v, int offset, int length)
        throws IOException
    {
        for (int i = 0; i < length; i++) {
            char ch = v.charAt(i + offset);

            if (ch < 0x80)
                os.write(ch);
            else if (ch < 0x800) {
                os.write(0xc0 + ((ch >> 6) & 0x1f));
                os.write(0x80 + (ch & 0x3f));
            }
            else {
                os.write(0xe0 + ((ch >> 12) & 0xf));
                os.write(0x80 + ((ch >> 6) & 0x3f));
                os.write(0x80 + (ch & 0x3f));
            }
        }
    }
74251
public static String printToString(Message message) {
        try {
            StringBuilder text = new StringBuilder();
            print(message, text);
            return text.toString();
        } catch (IOException e) {
            throw new RuntimeException("Writing to a StringBuilder threw an IOException (should never "
                                                       + "happen).",
                                       e);
        }
    }
691984
def pprint(string, token=[WORD, POS, CHUNK, PNP], column=4):
    
    if isinstance(string, basestring):
        print("\n\n".join([table(sentence, fill=column) for sentence in Text(string, token)]))
    if isinstance(string, Text):
        print("\n\n".join([table(sentence, fill=column) for sentence in string]))
    if isinstance(string, Sentence):
        print(table(string, fill=column))
372188
public static String string(byte[] bytes) {
    if (bytes == null) {
      return null;
    }
    try {
      return new String(bytes, ENCODING);
    } catch (UnsupportedEncodingException e) {
      log.error("UnsupportedEncodingException ", e);
      throw new RuntimeException(e);
    }
  }
645339
def printlog(self, string, verbose=None, flush=False):
        """"""
        if self.writelog:
            self.logger.info(string)
        if verbose or (self.verbose and verbose is None):
            print(string, flush=flush)
1139271
def _print(self, *args):
        
        string = u" ".join(args) + '\n'
        self.fobj.write(string)
752186
public void println(char c) throws IOException
  {
    this.singleByte[0] = (byte) c;
    this.output.write(this.singleByte, 0, 1);
    this.output.write(CRLF, 0, 2);
  }