How to show content of OutputStreamWriter?

Hi all,
I try to generate a post method which sends strings via
POST.
try {
OutputStream raw = m_uc.getOutputStream();
OutputStream buffered = new BufferedOutputStream(raw);
OutputStreamWriter out = new OutputStreamWriter(buffered);
out.write(sQuery);
out.flush();
out.close();
raw.close();
buffered.close();
Well, the method don't work and I need the
characters which are in OutputStreamWriter to see if the data from sQuery are correct transmitted to out.
How to get the characters written into out back into an
String to print it to command line ???
Thanks

private boolean debug = true;
private void logMsg(String str) {
if(debug)getServletContext().log(str);
try {
OutputStream raw = m_uc.getOutputStream();
OutputStream buffered = new BufferedOutputStream(raw);
OutputStreamWriter out = new OutputStreamWriter(buffered);
logMsg(sQuery); // string will show up in servlet enginges log file
out.write(sQuery);
out.flush();
out.close();
raw.close();
buffered.close();

Similar Messages

  • How to show content of a list which resides in other site collection in Office 365?

    Hi All,
    Can anyone help on How to show content of a list which resides in other site collection in Office 365 . Using Rest and Soap services this is not possible as we have limitations in office 365.So if anyone have any idea please let me know.
    Note : We are not allowed to use CSOM for this requirement.
    Many Thanks,
    Vinod.

    Hi Vinod,
    You can use cross site publishing feature of SharePoint 2013.
    http://blogs.msdn.com/b/justinvoels/archive/2012/09/24/sharepoint-2013-search-driven-publishing-and-cross_2d00_site-collection-publishing-overview.aspx
    https://technet.microsoft.com/en-us/library/jj635883.aspx
    Alternative to cross-site publishing in SP Online
    https://www.youtube.com/watch?v=chwHhEmIERg
    Best Regards,
    Brij K
    http://bloggerbrij.blogspot.co.uk/

  • How to show content from microsoft word and pdf on a page

    Hi,
    I have a microsoft word file stored in content repository and I want to show it in web page. When I drag and drop it using content presenter it shows file as a link with some extra details like created by, last modified by etc. I want content to appear in UI page itself. Content of document should get converted to html at runtime and then appear in UI. Is it possible?
    Thanks
    Sanjeev

    Sanjeev,
    I see you have as similar requirement you posted in the thread here :
    Skipping ucm login form when showing content on webcenter application.
    InBound Refinery (IBR) would be the easiest way to accomplish this though.
    Once you have IBR installed and configured (you need to pick what formats need to be converted in the refinery, and in your case, choose MS Office formats),
    You can use the document viewer taskflow to render PDF versions of your Word/Excel or PDF documents on a webcenter page. There is little to no setup required for this, beyond configuring IBR (but configuring IBR is fairly involved) and selecting what MIME types you want IBR to process.
    Another thing to watch out for if you are using Spaces is, make sure you set the context root for UCM properly though EnterpriseManger.
    Dynamic Converter can also be used to get similar results. You mention that you are using an Iframe, that means the client is making a request to UCM directly, and to avoid re-authenticating there, you should have SSO enabled. With Dynamic converter, you can use a URL of the form :
    http:// +<host>:<port>+ / +<context_root>+ /idcplg?IdcService=GET_DYNAMIC_CONVERSION&dDocName= +<docID>+ &RevisionSelectionMethod=LatestReleased
    To get an HTML rendition of that document.
    Hope it helps !
    -Jeevan
    Edited by: Jeevan Joseph on May 14, 2012 3:07 PM
    Edited by: Jeevan Joseph on May 14, 2012 3:08 PM

  • How to show content in a pdf file on swf

    I have a project Flash, that i want show content in a pdf file on swf file, but i don't know to show it
    So, who body help me ?
    Thanks!

    you can load your pdf into your browser using
    navigateToURL(new URLRequest("yourpdf.pdf"));

  • Oracle portal 11g- how to show content of a mounted folder in a page

    Hi there!
    We have installed oracle portal 11g on a server with cent os 5 on it. There is a certain shared folder in our network that we have mounted using autofs in a certain directory, on which every user has permissions of read and write, the contents of which we want to be able to access through a page in our portal. I have set up an alias in http server (Server configuration) to indicate the folder in discussion. However, when I press the link in that page, an error occurs (Forbidden-You are not authorized to see this page). What am I missing???? Is there a special configuration for shared folders in a domain?
    Thanks in advance!

    Hi Vinod,
    You can use cross site publishing feature of SharePoint 2013.
    http://blogs.msdn.com/b/justinvoels/archive/2012/09/24/sharepoint-2013-search-driven-publishing-and-cross_2d00_site-collection-publishing-overview.aspx
    https://technet.microsoft.com/en-us/library/jj635883.aspx
    Alternative to cross-site publishing in SP Online
    https://www.youtube.com/watch?v=chwHhEmIERg
    Best Regards,
    Brij K
    http://bloggerbrij.blogspot.co.uk/

  • How to show catalog items with Approval Status:Pending in a Content Search Webpart

    How to show catalog items with Approval Status:Pending in a Content Search Webpart using cross site publishing. Thanks in advance.

    I don't think you're going to be able to. Usually Approval Status is used in conjunction with Major/Minor versioning and while Approval Status is pending the item is usually a draft.
    As a result the search crawler should not be able to see the draft items as it would not have the necessary rights to do so. (Good practice ensures that the Search Crawler has only read access and is not an elevated account for this reason)
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • How to format paragraph string to show content left, Right or middle of pdf document using iTextsharp ' vb

    Dear All
    how to format paragraph string to show content left, Right or middle of pdf document using iTextsharp in visual basic and absolute position on the document.
    Thanks

     Here is one more example that i have modified the GetCell function so that you can use it for adding all the cells to the document.  It takes several arguments to specify everything you need to create each cell.  It now lets
    you specify the Text, the Text Alignment, the Text Font and color, weather the cell shows the Border, the BackColor of the cell, and the Padding values for the Left, Right, Top, and Bottom.
     If you study the code you should be able to figure out how it works.  From here you can figure out the rest of what you need to do and how to use the
    GetCell function.
     With one quick google search for "iTextSharp Documentation" the first link to pop up was this link.
    iTextSharp Documentation
    Imports System.IO
    Imports Its = iTextSharp.text
    Public Class Form1
    Private dt As New DataTable
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    dt.Dispose()
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    dt.Columns.Add("Name")
    dt.Columns.Add("Age")
    dt.Columns.Add("Birth Date")
    dt.Rows.Add(New Object() {"Johnny", "23", Now.AddYears(-23).ToString})
    dt.Rows.Add(New Object() {"Frank", "41", Now.AddYears(-41).ToString})
    dt.Rows.Add(New Object() {"Rex", "33", Now.AddYears(-33).ToString})
    dt.Rows.Add(New Object() {"Kim", "26", Now.AddYears(-26).ToString})
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim MyPdfFilePath As String = "C:\TestFolder\MyPdf.pdf"
    Dim pSize As New Its.Rectangle(Its.PageSize.A4)
    Dim PdfDoc As Its.Document = New Its.Document(pSize, 10, 10, 10, 10)
    Dim PdfImage As New Its.Jpeg(New Uri("C:\TestFolder\MyLogo.jpg"))
    PdfImage.Alignment = Its.Jpeg.ALIGN_CENTER
    Dim pTable As New Its.pdf.PdfPTable(1)
    pTable.AddCell(getCell("Name : " & TextBox1.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 15, Its.BaseColor.BLACK), False, Its.BaseColor.WHITE, 10, 0, 0, 0))
    pTable.AddCell(getCell("Policy : " & TextBox2.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 20, Its.BaseColor.RED), False, Its.BaseColor.WHITE, 10, 20, 0, 0))
    Dim cTable As New Its.pdf.PdfPTable(dt.Columns.Count)
    For Each col As DataColumn In dt.Columns
    cTable.AddCell(getCell(col.ColumnName, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 12, Its.BaseColor.WHITE), True, Its.BaseColor.BLUE, 3, 5, 0, 0))
    Next
    Dim tblfont As Its.Font = Its.FontFactory.GetFont("Arial", 10, Its.BaseColor.BLACK)
    For Each row As DataRow In dt.Rows
    cTable.AddCell(getCell(row.Field(Of String)("Name"), Its.pdf.PdfPCell.ALIGN_LEFT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 3, 0))
    cTable.AddCell(getCell(row.Field(Of String)("Age"), Its.pdf.PdfPCell.ALIGN_CENTER, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 0))
    cTable.AddCell(getCell(row.Field(Of String)("Birth Date"), Its.pdf.PdfPCell.ALIGN_RIGHT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 3))
    Next
    Using fs As New FileStream(MyPdfFilePath, FileMode.Create, FileAccess.Write, FileShare.None)
    Using pdfWrite As Its.pdf.PdfWriter = Its.pdf.PdfWriter.GetInstance(PdfDoc, fs)
    PdfDoc.Open()
    PdfDoc.Add(PdfImage)
    PdfDoc.Add(pTable)
    PdfDoc.Add(cTable)
    PdfDoc.Close()
    End Using
    End Using
    PdfDoc.Dispose()
    End Sub
    ''' <summary>Creates a new cell for the table.</summary>
    ''' <param name="text">The text string for the cell.</param>
    ''' <param name="alignment">Alighnment for the text string.</param>
    ''' <param name="textfont">The font used for the text string.</param>
    ''' <param name="border">True to show the cell border. False to hide the cell border.</param>
    ''' <param name="backcolor">The background color of the cell.</param>
    ''' <param name="padtop">The amount of padding on the top of the text string.</param>
    ''' <param name="padbottom">The amount of padding on the bottom of the text string.</param>
    ''' <param name="padleft">The amount of padding on the left of the text string.</param>
    ''' <param name="padright">The amount of padding on the right of the text string.</param>
    Public Function getCell(ByVal text As String, ByVal alignment As Integer, ByVal textfont As Its.Font, ByVal border As Boolean, ByVal backcolor As Its.BaseColor, ByVal padtop As Single, ByVal padbottom As Single, ByVal padleft As Single, ByVal padright As Single) As Its.pdf.PdfPCell
    Dim cell As New Its.pdf.PdfPCell(New Its.Phrase(text, textfont))
    cell.BackgroundColor = backcolor
    cell.PaddingLeft = padleft
    cell.PaddingRight = padright
    cell.PaddingTop = padtop
    cell.PaddingBottom = padbottom
    cell.HorizontalAlignment = alignment
    If Not border Then cell.Border = Its.pdf.PdfPCell.NO_BORDER
    Return cell
    End Function
    End Class
    If you say it can`t be done then i`ll try it

  • How to show Certificate Content from IE

    Hi,
    how to show Certificate Content Window from IE. I dont like to write it by myself;).
    Does anybody know if its posible?
    Regards

    Using Firefox, simply click the padlock.
    Suspect IE is much the same.

  • I accidentally ran iPhoto Library Upgrader on my Picture folder and now I have to right click on it to "show contents" instead of looking at it in Finder.  Help!

    Help!  I have 2 problems related to iPhoto:
    1:  I accidentally ran iPhoto Library Upgrader on my Picture folder and now I have to right click on it to "show contents" instead of double clicking on it and looking at it in Finder.  I cannot figure out how to fix my Pictures Folder so that I can click on it and view it in Finder, when I double click on it Terminal opens up with this message  "Pictures - Bash 80x24"  and
    Last login: Mon Nov  3 14:00:05 on ttys000
    Christinas-MacBook-Pro:Pictures christinagrierson$
    It will not let me replace or delete the folder...  I got to my files and backed them up, but trying to avoid reinstalling my OS.
    2:  When I try to Upgrade my Library.iPhoto file so I can open it in iPhoto it says I need to finish by opening in iPhoto, but then when I do, it tells me it first needs to be upgraded in the iPhoto Library Upgrader... Vicious circle.  Please, help!  Just trying to recover about 3 years worth of photos...

    Hi!  Thanks for responding!
    I have iPhoto 9.5.1, I am on OS X Version 10.9.5 on a MacBook Pro with 2.66 GHz
    My current "iPhoto Library" file is OK (I can open it with iPhoto), however I cannot access the old one from iPhoto 6 titled Library.iPhoto
    I tried right clicking and choosing the application, it did not work.
    "exactly how did you "I got to my files and backed them up"" - I showed the contents of my Pictures folder, and it opened up the folders in Finder and I copied them to an external hard drive.  In my Picture folder I have several folders of Photos plus the iPhoto Library files (old & current)
    I do have old back ups, but they are from April, and I recently imported 5 months of photos from my iPhone, so the iPhoto Library I copied after showing contents is the one I need.

  • How to show Html5 created in eclipse and link to any cloud application like c4C through HCP

    Hi Experts,
    How to show Html5 created in eclipse and link to any cloud application like C4C through HCP 
    Regards,
    Vijay.

    Your question is very unclear, please elaborate what you are trying to achieve.
    Also, did you click on the Alert Moderator link? This is for reporting abusive content, spam, points cheating, etc. It should not be used w/o a reason (one of the above) as what it does is putting the content in the Moderators' queue and hiding it from public view.

  • How to show data vertical in ALV

    How to show data vertical in ALV?
    such as :
    [http://img402.imageshack.us/img402/9978/20101230215621.png|http://img402.imageshack.us/img402/9978/20101230215621.png]
    Moderator Message: Search for available information. Keywords - Dynamic Internal Table
    Edited by: kishan P on Dec 30, 2010 7:35 PM

    Transpose the contents of your internal table.
    Original:
    A 1 1 1
    B 2 2 2
    Transposed:
    A B
    1 2
    1 2
    1 2

  • How to  show additional items in the same window using stacked canvas

    How to show additional items in the same window using stacked canvas.
    My content canvas has 14 items, and I have to include more.
    I want to know how I can use a stacked canvas to show these additional items in the same window, so that I can scroll through horzontally , as if all the items are on one canvas.

    Well, I intially navigate into my content canvas. At this stage the stacked canvas is not visible, then how should I navigate to an item on the stacked canvas to make it visible?

  • How to find content of a constraint etc.

    Hi,
    select constraint_name
    from user_constraints
    where table_name = 'EMP';
    shows to two constraints for the given table of EMP. Now, how to find CONTENT of each of these two constraints?
    Secondly, how to find if a particular column is nullable (programmatically, not from DBA tool set)? e.g. EMP.deptno
    Thirdly, why did I get the err msg of "inserted value too large for column"
    when executing the following command for data insertion to EMP as user, scott
    create SEQUENCE emp_sequence
    start with 8000 increment by 10;
    insert into EMP values (emp_sequence.NEXTVAL,'JOE','Researcher',null,null,null,null,null);
    Thanks a bunch.

    Thirdly, why did I get the err msg of "inserted value too large for column"Er, do the math...
    SQL> conn scott/tiger
    Connected.
    SQL> desc emp
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    SQL> select length('researcher') from dual
      2  /
    LENGTH('RESEARCHER')
                      10
    SQL>
    Secondly, how to find if a particular column is nullable (programmatically, not from DBA tool set)Don't like the sound of this, smells of dynamic coding. Anybody who can't figure out why they can't create an EMP record for a researcher probably ought not to be tangling with dynamic SQL just yet.
    Now, how to find CONTENT of each of these two constraints?The CONSTRAINT_TYPE tells you the sort of constraint: P=PRIMARY KEY, U=UNIQUE, R=FOREIGN KEY and C=CHECK. Only Check constraints have any content as such and you'll find that in the SEARCH_CONDITION. Note that this is a LONG column, so you may need need to SET LONG 5000 to see it in SQL*Plus.
    Cheers, APC
    P.S. In future please refrain from bundling unrelated questions into a single post. There is no charge for posting and it avoids the threads getting long and hard to follow.

  • Bridge CS6 (64bit) - on Windows 8.1 pro Freezes and it delays showing content while opening

    I have been using Bridge/Photoshop without any incident. But recently when I open Bridge it takes too long to show content and If I double click on a folder or photo It freezes showing in the bar above - not responding. After some seconds it goes back to life. I have not installed any software. I have the program installed in the C Hard Drive, the Photos and the Cache in different Hard Drives with plenty of space (WD - Black Series). I have also checked the hard drives just in case but are OK. Any guess???? Thank you

    A month ago I uninstalled AVG Internet security from my computer making it a lot less potent to BSODs in general, (can't reacall having any.) So today I thought I'd try to learn some more Audition. I could Sit with it for a good while just playing around with recordings and settings and my system didn't react weirdly at all. So the next step was of course to try and load some of the Udemy lectures I had waiting.
    As the video was buffering I turned away from the computer for a while, but when I came back it had completely froze up again... I don't think I've ever had a BSOD in this context either, instead of going into BSOD the computer just stops responding completely.
    (I'm using the latest version of Flash, tried with both Firefox and Chrome.)
    I'm thinking this is a very niche bug and I can't seem to se that it can be anything but a conflict with Flash. Weither it's a memory leek or what ever it is.
    I can use Audition fine on my computer it seems, as long as I never start a browser in risk of loading a Flash application, (which would be fine if I was avid, but I need some lectures to get started.)
    Nothing really seems to be overloaded (RAM/CPU) before the freeze ocurs either.
    I  don't really know where or how to adress this to the Flash Player forum/community, (or if there is one.)
    Thanks.

  • How to show BLOB type Column ? In XE

    How to show BLOB type Column as image in APEX report area? (In XE)
    I did it with the following procedure
    create or replace PROCEDURE MY_IMAGE_DISPLAY (p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT 'JPEG', MLOGO, 'IMAGE', DBMS_LOB.getlength (MLOGO)
    INTO l_mime, lob_loc, l_file_name, l_length
    FROM CARS_TABLE
    WHERE M_ID = p_image_id;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/octet'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END my_image_display;
    GRANT EXECUTE ON my_image_display TO PUBLIC;
    and executed the following command
    CREATE PUBLIC SYNONYM my_image_display FOR shema_name.my_image_display;
    but under XE , I can not see synonym? why?

    sakrami,
    Your question really belongs in the XE forum:
    Oracle Database Express Edition (XE)
    I think this posting addresses your question:
    Re: Handling of pictures changed? Item values not properly updated in Beta
    Joel

Maybe you are looking for