Code example for ProtocolVersion

Methods: forVersion

0
    		// so we'll replace it with 1 MB to prevent the MediaPlayer 
    		// from buffering forever. 
//    		httpString.append(name).append(": ").append("1048576").append("\n"); 
    	} else { 
    		httpString.append(name).append(": ").append(h.getValue()).append("\n");	
    	} 
       
    } 
    httpString.append("\n");
    Log.d(LOG_TAG, "headers done");
 
    try { 
      byte[] buffer = httpString.toString().getBytes();
      int readBytes = -1;
      Log.d(LOG_TAG, "writing to client");
      client.getOutputStream().write(buffer, 0, buffer.length);
 
      // Start streaming content. 
      byte[] buff = new byte[1024 * 50];
      while (isRunning && (readBytes = data.read(buff, 0, buff.length)) != -1) {
        client.getOutputStream().write(buff, 0, readBytes);