How to make reader.ready() return false

reader.ready() method returned false for me when reading from
when reader is obtained from databse. eg. Clob reader.
So that can be acceptable that next call may block thats why ready() returned false.
But i want to simulate situation when reader.ready() returns false even if reader is eg. FileReader, directy reading from
existing file on local unix machine. (and this file is having content)
So can it happen? And in which cases?

can you telll me those few cases for this method ?
I am interested in cases when io operations on local non empty file may lead to blocking call so that this method will return false

Similar Messages

  • How to make table as "editable false"

    Dear Forum,
    i am user of jDeveloper jClient/Swing .jpr.
    cutomer table having following attributes-
    1.cust_id (primary key)
    2.cust_name
    3.cust_add
    Suppose customerview bind with jTable1.
    Using ViewObjectEditor, i set "updateable never" for all fields.
    This show error, when data insert into table " cust_id as
    read only".
    Help me, Using jClient Binding how to make Table as "editable false".

    Overriding method prepareEditor() for new table:
    private JTable tableList = new JTable(){
    public Component prepareEditor(TableCellEditor editor, int row, int column) {
    // 1 and 2 column is not editable
    if(column == 0 || column == 1){ return null; }
    return super.prepareEditor(editor, row, column);

  • How to make a function return number(10,0) data type (ORACLE 10g)?

    With 10g, how to make a function return number(10,0) data type?
    here is the function, it returns a number type :
    create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
    v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
    BEGIN
    If p_HistObjTable ='amPortfolio'
    then v_Id:=p_LHISTOBJID ;
    elsIf p_HistObjTable = 'amComputer' then
    select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
    else v_Id:=-99;
    End If;
    RETURN v_Id;
    END Get_portfolio_Id3;
    Thanks.
    Message was edited by:
    user631701

    create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
    v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
    BEGIN
    If p_HistObjTable ='amPortfolio'
    then v_Id:=p_LHISTOBJID ;
    elsIf p_HistObjTable = 'amComputer' then
    select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
    else v_Id:=-99;
    End If;
    RETURN round(v_Id);
    END Get_portfolio_Id3;

  • How to make read only field in Task list?

    Hi All,
    How to make read only field in Task list?

    This can be done one of two ways:
    1. Customize the form in Infopath, right click your field and disable the control.
    2. Use JavaScript/jQuery on the page to disable the element.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • ServletAuthentication.weak() makes isUserInRole() always return false

    I have a problem with SSO and authentification. If I authenticate with the weak()
    method(have tried alle of them) authentication works fine and it seem to be single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativ security-constraints also
    works fine preventing the user from accessing the pages. It is only when we use
    the forward() method that we also use isUserInRole() to check if the user is permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, no matter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole() works
    fine. I can't use j_sec_check as a permanent solution though, because I need to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn't isUserInRole()
    work the same way regardless of if you logged in using SA.weak() or a j_security_check
    form?

    Hi ,
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.You can use the j_security_check and still do the pre and post processing as
    you want.
    You have to following code,
    package examples.servlets;
    import java.io.PrintStream;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import weblogic.servlet.security.AuthFilter;
    public class AuthFilterImpl extends AuthFilter
    public AuthFilterImpl()
    System.out.println("New AuthFilterImpl has been created.");
    public void doPreAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doPreAuth has been called.");
    System.out.println("Password is " +
    servletrequest.getParameter("j_password"));
    public boolean doSuccessAuth(ServletRequest servletrequest,
    ServletResponse servletresponse)
    System.out.println("AuthFilterImpl.doSuccessAuth has been called.");
    return true;
    public void doFailAuth(ServletRequest servletrequest, ServletResponse
    servletresponse)
    System.out.println("AuthFilterImpl.doFailAuth has been called.");
    In your weblogic.xml have this entry,
    <weblogic-web-app>
    <auth-filter>
    examples.servlets.AuthFilterImpl
    </auth-filter>
    </weblogic-web-app>
    I am not sure about problem with SA.weak().
    -utpal
    "Morten" <[email protected]> wrote in message
    news:[email protected]...
    >
    I have a problem with SSO and authentification. If I authenticate with theweak()
    method(have tried alle of them) authentication works fine and it seem tobe single
    signed-on, but
    if we call the isUserInRole() method it always return false.
    If I try to "call" pages from the client the declerativsecurity-constraints also
    works fine preventing the user from accessing the pages. It is only whenwe use
    the forward() method that we also use isUserInRole() to check if the useris permitted
    to be forwarded(). WLS 6.1 sp2 tells us that the user is never in Role, nomatter
    what, if we use the weak() method to authenticate.
    If I switch to using a j_sec_check form to authenticate the isUserInRole()works
    fine. I can't use j_sec_check as a permanent solution though, because Ineed to
    do a lot of pre- and post- processing in the login/authenication process.
    Have any of you figured out a solution to this problem? Shouldn'tisUserInRole()
    work the same way regardless of if you logged in using SA.weak() or aj_security_check
    form?

  • How to make a Carriage Return in a Word-Table by OLE Automation

    I generated a Table in a Word-Document by using the OLE2 Interface.
    After that I wrote a Text in the first cell of the table.
    Now I want to make a Carriage Return to write another Textline in the same Cell.
    But first i must move the cursor to the end of the Text.
    I haven't already figured that out.
    Can someone Help me?
    I tried this but then the Cursor moves to the Begin of the second Cell in the same row.
    *Writing the Text in the Cell
      GET PROPERTY OF o_cell 'Range' = o_range.
      SET PROPERTY OF o_range 'Text' = wa_anschr-ename.
    *Move Cursor
      GET PROPERTY OF o_cell  'Range' = o_range.
      GET PROPERTY OF o_range 'End' = ld_pos.
      SET PROPERTY OF o_range 'Start' = ld_pos.
      CALL METHOD OF o_range ' Select'.

    I don't know about your suggestion.
    I solved the Problem with that Method:
    CALL METHOD OF o_selection 'EndKey'
        EXPORTING
          #1 = '5'.
      CALL METHOD OF o_selection 'TypeParagraph'.
    The Parameter "5" ist the VB Constant wdline...
    Now it works and I'm happy

  • How to make regex alternation return first match?

    Hi,
    I have the following string:
    "i am a man and i have a cat and a dog and a bird"
    and I wish to extract the part of the sentence from "man" up to the first occurence of "dog" or "cat". So I wish the extracted sentence to be
    "and i have a"
    or alternatively
    "man and i have a cat"
    I would guess the regular expression "man.*(cat|dog)" should do it, but that seems to always return the sentence up to the last occurrence of dog and cat, when I want the first occurrence. So "man.*(cat|dog)" returns (when using find() and group()):
    "man and i have a cat and a dog"
    Anyone have any ideas how I can return the sentence from (preferably excluding) man and to (preferably excluding) the first occurrence of cat or dog?
    Thanks!
    Message was edited by:
    MagnusGJ
    Message was edited by:
    MagnusGJ

    Take your pick -
            // One  possibility
            String target = "i am a man and i have a cat and a dog and a bird";
            String result = target.replaceFirst(".*?man (.*?)( cat| dog).*", "$1");
            System.out.println(result);
            // and another
            Matcher m = Pattern.compile("man (.*?) (cat|dog)").matcher(target);
            if (m.find())
                System.out.println(m.group(1));
            }

  • How to make Reader user save PDF form that it can be save again

    Hei,
    I have a problem. I have pdf form which my clients can field and then save (they use reader). When comes more detail some other user field out more this same form. But reader dont allow to save this form again. Why so? Is there any way to make it happen that different user from different computer can save pdf form again. Why this is possible to save again same computer but dosent different?
    Thank you for help!!!!!

    Yes, www.fab-equp.com<http://www.fab-equp.com> at the bottom of the home page.  “Used Equipment Report”
    Regards,
    Clayton Hughes
    614.377.5469

  • How to Make FUNCTION to return multiple column and multiple row output

    Hi All,
    Kindly Share ur Idea;Thanks in Advance;
    i Have Table Demo.
    table DEMO:
    id name
    1 a10
    1 a11
    1 a12
    2 b10
    2 b11
    3 ccc
    and the function is like:
    create or replace function (p1 number) return varchar2 as
    vid number;
    vname varchar2(20);
    begin
    select id,name into vid,vname from demo where id=p1;
    return v1;
    end;
    this function returns output for id=3;
    BUT,
    i need output as (for input as 1)
    vid vname
    1 a10
    1 a11
    1 a12

    A function returns a single datatype.
    That datatype may be an atomic datatype (varchar2, number etc.) or it may be an object/record datatype, or even a collection datatype.
    Where are you going to use this function? In PL/SQL or SQL?
    If you are wanting to use it in SQL, then you would need a pipelined function e.g.
    SQL> CREATE OR REPLACE TYPE myemp AS OBJECT
      2  ( empno    number,
      3    ename    varchar2(10),
      4    job      varchar2(10),
      5    mgr      number,
      6    hiredate date,
      7    sal      number,
      8    comm     number,
      9    deptno   number
    10  )
    11  /
    Type created.
    SQL> CREATE OR REPLACE TYPE myrectable AS TABLE OF myemp
      2  /
    Type created.
    SQL> CREATE OR REPLACE FUNCTION pipedata(p_min_row number, p_max_row number) RETURN myrectable PIPELINED IS
      2    v_obj myemp := myemp(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      3  BEGIN
      4    FOR e IN (select *
      5              from (
      6                    select e.*
      7                          ,rownum rn
      8                    from (select * from emp order by empno) e
      9                   )
    10              where rn between p_min_row and p_max_row)
    11    LOOP
    12      v_obj.empno    := e.empno;
    13      v_obj.ename    := e.ename;
    14      v_obj.job      := e.job;
    15      v_obj.mgr      := e.mgr;
    16      v_obj.hiredate := e.hiredate;
    17      v_obj.sal      := e.sal;
    18      v_obj.comm     := e.comm;
    19      v_obj.deptno   := e.deptno;
    20      PIPE ROW (v_obj);
    21    END LOOP;
    22    RETURN;
    23  END;
    24  /
    Function created.
    SQL> select * from table(pipedata(1,5));
         EMPNO ENAME      JOB               MGR HIREDATE                    SAL       COMM     DEPTNO
          7369 SMITH      CLERK            7902 17-DEC-1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN         7698 20-FEB-1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN         7698 22-FEB-1981 00:00:00       1250        500         30
          7566 JONES      MANAGER          7839 02-APR-1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN         7698 28-SEP-1981 00:00:00       1250       1400         30
    SQL> select * from table(pipedata(6,10));
         EMPNO ENAME      JOB               MGR HIREDATE                    SAL       COMM     DEPTNO
          7698 BLAKE      MANAGER          7839 01-MAY-1981 00:00:00       2850                    30
          7782 CLARK      MANAGER          7839 09-JUN-1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST          7566 19-APR-1987 00:00:00       3000                    20
          7839 KING       PRESIDENT             17-NOV-1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN         7698 08-SEP-1981 00:00:00       1500          0         30
    SQL> select * from table(pipedata(11,15));
         EMPNO ENAME      JOB               MGR HIREDATE                    SAL       COMM     DEPTNO
          7876 ADAMS      CLERK            7788 23-MAY-1987 00:00:00       1100                    20
          7900 JAMES      CLERK            7698 03-DEC-1981 00:00:00        950                    30
          7902 FORD       ANALYST          7566 03-DEC-1981 00:00:00       3000                    20
          7934 MILLER     CLERK            7782 23-JAN-1982 00:00:00       1300                    10
    SQL>If you are using it in PL/SQL then just populating a collection datatype and returning that will do. Though you should question why you want to pass large amounts of data around like that first.
    Explain your purpose and what you are intending to do and we can recommend the best way.
    {message:id=9360002}

  • How to make "Read Report" pick up enhancement code as well

    I want to enhance a SAP ECC6 program - H99CWTR0 (Wage type reporter). I need to add some more master data objects from other HR tables.
    I have succesfully applied implicit enhancements to this program to allow my users to select extra data objects and to retrieve the relevant data from the database. However, the program reads a subroutine pool called H99CWTR0_ALV_TEMPLATE and makes dynamic run time changes and generates a temporary subroutine pool. I have also had to apply implicit enhancements to the template but this is not read by H99CWTR0. So I am unable to to keep the shared data segment in line with the driver program H99CWTR0 which leads to an ABAP dump.
    I would prefer to make all changes to SAP programs using the enhancement framework rather than having to clone SAP programs into the "Z" namespace.
    Is there a way of making the "Read report" pick up the implicit enhancement code as well as all the other includes in the template?

    Hi Prabhu
    The dump text said -
    "The length of COMMON PART "DRIVER_DATA_EXCHANGE" in program "%_T0DYT0" is different from the corresponding area in the calling program "H99CWTR0".
    Length of the COMMON PART in program %_T0DYT0: 1224 bytes
    Length of the COMMON PART in program H99CWTR0: 1232 bytes
    There is probably an error in the program "H99CWTR0"."
    My enhancement to H99CWTR0 is being accessed, but the equivalent enhancement to H99CWTR0_ALV_TEMPLATE is not. Hence the discrepancy in the length of common shared data segment.
    The ABAP line "read report iv_template into lt_code." in include H99CWTR0_FORMS is not reading the implicit ehancement code I added. So when the ABAP line "generate subroutine pool lt_code name ov_driver message mm line ll" is called to generate the temporary subroutine code my code is lost.
    Regards
    Phil Smith

  • How to make apdu.getBuffer() return buf that is greater than 133 bytes.

        public void process(APDU apdu) {
          byte[] buf = new byte[256];
            buf = apdu.getBuffer();
            // GOOD PRACTICE: RETURN 9000 ON SELECT
            if (selectingApplet()) {
                return;
            apdu.setIncomingAndReceive();
            switch (buf[ISO7816.OFFSET_INS]) {
                case (byte) 0x01:
    This is my process method. I have a command APDU of length 200 bytes that I want the buffer to read and store into a local byte array. However, apdu.getBuffer() is only grabbing the first 133 bytes of data.
    According to javadocs:
    "The APDU object is owned by the Java Card runtime environment. The APDU class maintains a byte array buffer which is used to transfer incoming APDU header and data bytes as well as outgoing data. The buffer length must be at least 133 bytes ( 5 bytes of header and 128 bytes of data ). The Java Card runtime environment must zero out the APDU buffer before each new message received from the CAD."
    Since the buffer length is larger than 133 bytes, why does it not accept the remaining bytes?
    I am using jCardSim on NetBeans IDE, java card version 2.2.2.
    Also, could someone explain to me what exactly apdu.setIncomingAndReceive() does? My code is able to build/run both with and without it.
    Thanks

    I tried using that in my code, but it's still not working, I must be placing it in the wrong spot. I put it in the process method right before my switch cases. Do I actually put all of the code in the while loop? Perhaps you could explain the code to me, why do you only want the last two bytes of LC, and why 55? This is what it looks like currently:
        public void process(APDU apdu) {
            byte[] buf = apdu.getBuffer();
            // GOOD PRACTICE: RETURN 9000 ON SELECT
            if (selectingApplet()) {
                return;
           short bytesLeft = (short) (buf[ISO7816.OFFSET_LC] & 0x00FF);
            if (bytesLeft < (short) 55) {
                ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
            short readCount = apdu.setIncomingAndReceive();
            while (bytesLeft > 0) {
                // process bytes in buffer[5] to buffer[readCount+4]; 
                bytesLeft -= readCount;
                readCount = apdu.receiveBytes(ISO7816.OFFSET_CDATA);
            // HARDCODED PARAMETERS TO PASS INTO FUNCTIONS
            byte[] O = new byte[6];
            byte[] U = new byte[3];
            byte[] N = new byte[5];
            byte[] A = new byte[4];
            Util.arrayCopy(buf, (short) (ISO7816.OFFSET_EXT_CDATA), O, (short) 0, (short) 6);
            Util.arrayCopy(buf, (short) (ISO7816.OFFSET_EXT_CDATA + 7), U, (short) 0, (short) 3);
            Util.arrayCopy(buf, (short) (ISO7816.OFFSET_EXT_CDATA + 11), N, (short) 0, (short) 5);
            Util.arrayCopy(buf, (short) (ISO7816.OFFSET_EXT_CDATA + 17), A, (short) 0, (short) 4);
            switch (buf[ISO7816.OFFSET_INS]) {
                case (byte) 0x01:
                    // CALL FUNCTION  R
                    byte[] b = R(O, U, N, A);
                    // PRINT B
                    apdu.setOutgoing();
                    apdu.setOutgoingLength((short) b.length);
                    apdu.sendBytesLong(b, (short) 0, (short) b.length);
                    break;
                case (byte) 0x02:
                    byte[] k2 = new byte[(short) 176];  
                    //29 is the offset in the command apdu that contains the parameter data
                   // THIS IS THE LINE THAT THE CODE FAILS AT - SINCE IT CAN ONLY READ 133 BYTES OF DATA, IT CAN'T ARRAY COPY 176 BYTES OF DATA FROM buf
                    Util.arrayCopy(buf, (short) 29, k2, (short) 0, (short) 176);
                    byte[] a = S(k2, O, U, N);
                    // PRINT a
                    apdu.setOutgoing();
                    apdu.setOutgoingLength((short) a.length);
                    apdu.sendBytesLong(a, (short) 0, (short) a.length);
                    break;

  • How to make find methods return a subset of the result?

    Take the multipage apps for instance,
    it is a common idea to return only a subset(No. 10~No. 30) of the full-list especially when there are millions item in the full-list.
    Please help me:)

    Maybe you're looking for something like a "Value List Handler"
    http://developer.java.sun.com/developer/restricted/patterns/ValueListHandler.html

  • BufferedReader.ready() keeps returning false using JSSE 1.0.2/jdk 1.2.2

    I'm running into difficulties reading a response data stream from a server via HTTPS. The SSL sets up fine (I can see both the client side and server side certificate chains, and the two sides can handshake and agree on a cipher (SSL_RSA_WITH_RC4_128_SHA in this case)). I get no errors getting the output or input streams from the socket, and the GET request seems to work (no errors reported by the PrintWriter), but in.ready() returns false, and the while loop exits immediately. But I know there is data available (I can paste the printed url into Netscape and get data back). Since this should not be all that complex once the SSL session is established, I'm probably missing something silly, Can someone tell me what it is please?
    Thanks
    Doug
    // code excerpt
    // just finished printing the cipher suite, cert chains, etc
    try{
    out = new PrintWriter(
    new BufferedWriter(
    new outputStreamWriter(socket.getOutputStream() )));
    } catch(Exception e) {
    System.out.println("Error getting input and output streams from socket ");
    System.out.println(e.getMessage());
    e.printStackTrace();
    throw(e);
    try{   // time to submit the request and get the data
    // build the URL to get
    // tried constructing it here and nailing it up at declaration time - no difference
    // path = "https://" + dlp.host + ":" + Integer.toString(dlp.port) + "/" +
    // dlp.basePath + "?StartDate=" + longDateFmtURL.format(dlp.startDate) +
    // "&EndDate=" + longDateFmtURL.format(dlp.endDate);
    System.out.println("Sending request for URL" );
    System.out.println(path);
    out.println("GET " + path );
    out.println();
    out.flush();
    * Make sure there were no errors
    if (out.checkError()){
    System.out.println("Error sending request to server");
    throw(new IOException("Error sending request to server")
    try{
         in = new BufferedReader(
              new InputStreamReader(
              socket.getInputStream() ));
    } catch(Exception e) {
    System.out.println("Error getting input stream from socket ");
    System.out.println(e.getMessage());
    e.printStackTrace();
    //System.exit(3);
    throw(e);
    if (!in.ready()) {   //  in.ready() keeps returning false
    System.out.println("Error - socket input stream not ready for reading");
    while ((inputLine = in.readLine()) != null) {
    // loop over and process lines if it was ever not null
    }

    Never mind.
    The problem seems to be related to the development/debugging enviroment (Oracle JDeveloper 3.2.3), When I run things outside of that eviroment using the "plain" runtime, it works as expected (back to System.out.println() for debugging). That said, I usually find it to be a nice development/debugging enviroment for Java.

  • How to make icon visible?

    HI !
    I´ve been making some icons with photoshop and icon composer, everything is fine except that I don´t know how to make the ready icon visible without third part application.
    At the moment icon composer leaves the icns file icon to applications own document icon.
    So:
    How to change icns files so that the icon that they contain is the icon that they display?

    I am at work (Windows) so I can't try this now, but, I've copied icon images between items by copy and paste. I wonder if you can, open the file, select and copy the icon image. Close the file, open the "Get Info" dialog, click the icon to select it (in the "Get Info" window) and paste.
    Otherwise there is a program (freeware I think) called "Pic to Icon" that makes the files icon the same as the picture it contains. I don't know if it works for .icns file though. But, if it doesn't the work around should be pretty easy.
    Good Luck!

  • How can i make a soft return with pages shift enter does not work!

    how can i make a soft return with pages shift plus enter does not work!!

    On full keyboards with a numeric keypad, the key above the right shift is "return" & the one on the numeric section is "enter." On a Mac (or Apple IIgs ) they do have separate functions. On the "mini" keyboards, both names are on the same key, but "enter" is written in smaller letters. I'll have to check to see how that works on another Mac later today.

Maybe you are looking for

  • Finding missed sequence numbers and rows from a fact table

    Finding missed sequence numbers and rows from a fact table Hi I am working on an OLAP date cube with the following schema: As you can see there is a fact transaction with two dimensions called cardNumber and Sequence. Card dimension contains about th

  • HT202998 copy paste in windows browsers numbers beta not working?

    Hi, Whenever I try to copy/paste an XLS file in numbers icloud, the file gets really messy. Data gets allocated to different cells compared to the original file. I have been using both Google Chrome and Firefox for windows, but have had no luck. Any

  • Spam Status :(import_proper)

    Dear All, We are Using SAP Enterprise Ecc6 on Windows 2003 Server and oracle-10.2.01.1.0 as database. my kernel 700 with patch 185, tp version 372.04.40, r3trans version 6.14 (release 700 - 16.10.08 - 16:26:00) During SPAM patch SAPKA70010 update i a

  • Can I search for duplicates in iPhoto 9.2.3?

    I believe earlier versions had a "search for duplicates" function.

  • Deleting Things

    All right i've finally given up and decided i need help. Saved all my music to an external hard drive, got a new computer, new itunes and transfered all my songs. But the stupid ******* itunes on my computer keeps deleting it everytime. I'll up load