NIO BufferedInputStream

I know I can extract the data from a NIO socket by reading the channel, but I was trying a different approach and ran across something strange.
When I take the socket from a NIO channel and attach a BufferedInputStream to it as with a normal socket, and then try to read from that every time the selector announces that data is ready - it will tell me there is no data to be read if I call available() - and if I try to read it won't return any. It seems almost as if the channel has already taken the data from the socket and buffered it into itself?
I'm just wondering if this is expected behavior, or if I am actually doing something wrong. (I know it's a strange approach - I'm just wondering if theoretically it should work or not)

Here is the relevant code from two different classes from a much larger project - I renamed and removed a few things so if something doesn't make sense that's probably why.
So, in this example tmpTO.ReadBufferedData(); is called and when it gets to System.out.println("bytesavail:'" + bytesAvail + "'"); it prints out bytesavail: 0
private void AddNewSocket(SocketChannel newSC)
     SelectionKey tmpSK = null;
     try
          newSC.configureBlocking(false);
          newSC.socket().setTcpNoDelay(true);
          tmpSK = newSC.register(mySelector, SelectionKey.OP_READ);
     } catch (IOException ioe) {}
     DataTestObj tmpTO = new DataTestObj(newSC.socket());
     tmpSK.attach(tmpTO);
* Start checking our sockets for incoming data
public void run()
     boolean listening = true;
     try
          // initialize our nio
          mySelector = SelectorProvider.provider().openSelector();
     } catch (IOException ioe) {}
     new Thread(NS).start();
     Thread.yield();
     while (listening)
          if (socketQueue.size() > 0)
               // if we have sockets waiting to be added...
               Iterator<SocketChannel> LI = socketQueue.iterator();
               while (LI.hasNext())
                    AddNewSocketFinal(LI.next());
                    LI.remove();
          try
               if (mySelector.select(2000) > 0)
                    Iterator LI = mySelector.selectedKeys().iterator();
                    while (LI.hasNext())
                         System.out.println("incoming sock data");
                         SelectionKey tmpSK = (SelectionKey)LI.next();
                         Object tmpObj = tmpSK.attachment();
                         UserObject tmpUO = null;
                         DataTestObj tmpTO = null;
                         try
                              tmpTO = (DataTestObj)tmpObj;
                         } catch (ClassCastException cce) {}
                         String tmpStr = "";
                         if (tmpSK.isReadable())
                              // handle any available data
                              tmpTO.ReadBufferedData();
                              tmpStr = tmpTO.StorePacket();
                              while (tmpStr.length() > 0)
                                   // do stuff with the packet data...
          } catch (IOException ioe) {}
public class DataTestObj
     Socket mySock = null;
     BufferedOutputStream bos = null;
     BufferedInputStream bis = null;
     String PacketData = "";
     public DataTestObj(Socket sock)
          mySock = sock;
          try
               bos = new BufferedOutputStream(mySock.getOutputStream());
          catch (IOException ioe) {}
          try
               bis = new BufferedInputStream(mySock.getInputStream());
          catch (IOException ioe) {}
      * Read all the data from the socket
     public void ReadBufferedData()
          System.out.println("reading buffer");
          int bytesAvail = 0;
          int bytesRead = 0;
          int myRead = 0;
          byte[] ByteArr = new byte[1024];
          try
               bytesAvail = bis.available();
          catch (IOException ioe)
               System.out.println("bis avail err?:'" + ioe.toString() + "'");
          System.out.println("bytesavail:'" + bytesAvail + "'");
          while (bytesRead < bytesAvail)
               try
                    myRead = bis.read(ByteArr);
               catch (IOException e)
                    System.out.println("bis read err?:'" + e.toString() + "'");
                    myRead = 0;
               System.out.println("bytesread:'" + myRead + "'");
               if (myRead > 0)
                    try
                         PacketData += new String(ByteArr,0,myRead,"ISO-8859-1");
                         System.out.println("new pd len:'" + PacketData.length() + "'");
                    } catch (IOException e) {}
                    bytesRead += myRead;
               else if (myRead == -1)
                    break;
}

Similar Messages

  • Java.nio.BufferUnderflowException when send a idoc xml using sapjco3.jar

    When I use sapjco3.jar to send a idoc
    I have 2 IDOC ,one size is 200kb ,another is 336kb
    the first one can send to sap correct, but the bigger one got Exception (java.nio.BufferUnderflowException)
    If any thing I have to note when writing java code ? thanks ....
    Exception:
    send TXLOG-12918467-ToIDOC_20110513161427170_1125436.xml
    send idoc D:\TXLOG-12918467-ToIDOC_20110513161427170_1125436.xml to SAP GateWay finished ,IDoc Tid is AC1140540B534DD1EAE61781
    send TXLOG-12964100.xml
    java.nio.BufferUnderflowException
         at java.nio.Buffer.nextGetIndex(Buffer.java:486)
         at java.nio.HeapCharBuffer.get(HeapCharBuffer.java:129)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLParser.parse(DefaultIDocXMLParser.java:365)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLProcessor.parse(DefaultIDocXMLProcessor.java:87)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLProcessor.parse(DefaultIDocXMLProcessor.java:68)
         at com.testrite.msg.dex.sender.SAPSender.sendMessage(SAPSender.java:61)
         at com.testrite.msg.dex.sender.SAPSender.main(SAPSender.java:37)
    My Code :
    JCoDestination destination;
    String dest = "BCE";
    destination = JCoDestinationManager.getDestination(dest);
    IDocRepository iDocRepository = JCoIDoc.getIDocRepository(destination);
    String tid = destination.createTID();
    IDocFactory iDocFactory = JCoIDoc.getIDocFactory();
    IDocXMLProcessor processor = iDocFactory.getIDocXMLProcessor();
    IDocDocumentList iDocList = processor.parse(iDocRepository, new BufferedInputStream(new FileInputStream("D:
    TXLOG-12964100.xml"));
    JCoIDoc.send(iDocList, IDocFactory.IDOC_VERSION_DEFAULT, destination, tid);

    hi,
    it only works with idoc to idoc scenarios I think
    when you send from SAP to SAP through XI
    have a look at my weblog:
    /people/michal.krawczyk2/blog/2005/11/21/xi-idoc-to-idoc-tunneling--how-fast-and-easy-can-you-get
    Regards,
    michal

  • NIO Performance Test Result

    Dear forum users.
    I wonder why "New I/O"(java.nio.*) is usefuel ?
    I tested "New I/O" performance.
    plz, see the code below..
    public class ByteBufferPerformanceTest {
         public static void main(String[] args) {
              File fileName = new File("c:\\kandroid_book_3rd_edition[1].pdf");   // 20MB file
              // ByteBuffer Usage
              long start1 = System.nanoTime();
              try {
                   int data=0;
                   FileInputStream fis = new FileInputStream(fileName);
                   FileChannel fc = fis.getChannel();
                   ByteBuffer bf = ByteBuffer.allocateDirect(1024);
                   while( fc.read(bf) != -1 ) {
                        //System.out.print(new String(bf.array(), 0, 1024));
                        bf.clear();
                   fis.close();
              } catch (FileNotFoundException ffe) {
                   ffe.getStackTrace();
              } catch (IOException ioe) {
                   ioe.getStackTrace();
              long duration1 = System.nanoTime() - start1;
              // BufferedInputStream Usage
              BufferedInputStream bin = null;
              long start2 = System.nanoTime();
              try {
                     bin = new BufferedInputStream( new FileInputStream(fileName) );
                     byte[] contents = new byte[1024];
                     int bytesRead = 0;
                     String strFileContents;
                     while ((bytesRead = bin.read(contents)) != -1) {
                         //strFileContents = new String(contents, 0, bytesRead);
                         //System.out.print(strFileContents);
              } catch (FileNotFoundException ffe ) {
                   ffe.getStackTrace();
              } catch ( IOException ioe ) {
                   ioe.getStackTrace();
              } finally {
                   try {
                        if ( bin != null)
                             bin.close();                    
                   }catch ( IOException e ) {
                        e.getStackTrace();
              long duration2 = System.nanoTime() - start2;
              // FileReader Usage
              long start3 = System.nanoTime();
              try {
                   FileReader fr = new FileReader(fileName);
                   BufferedReader br = new BufferedReader(fr);
                   String line;
                   while( (line=br.readLine())!=null ) {
                   br.close();
              } catch ( FileNotFoundException ffe) {
                   ffe.getStackTrace();
              } catch ( IOException ioe ) {
                   ioe.getStackTrace();
              long duration3 = System.nanoTime() - start3;
              System.out.println(String.format("%20s : %12d", "ByteBuffer", duration1));
              System.out.println(String.format("%20s : %12d", "BufferedInputStream", duration2));
              System.out.println(String.format("%20s : %12d", "FileReader", duration3));
    }Result(nanoTime)
    ByteBuffer : 60107360
    BufferedInputStream : 22748701
    FileReader : 597288203
    result.. as you can see, best class for file I/O is BufferedInputStream.
    so i mean, why is it need to use ByteBuffer ?
    am i tested it wrong way ?
    thx, for reading. thank you very much ..:)

    First of all: you're test is very, very flawed in multiple ways:
    1.) You try reading the same file 3 times. The first one will take the cache hit, while the OS actually loads the file from the disk and the others will just test how fast accessing the OS cache is
    2.) You're only doing a single read of the file and didn't tell us if you tried that experiment multiple times (to avoid small timing difference to influence the result)
    3.) your three methods do different things. Specifically the last method converts the bytes to Strings which is meaningless for a binary file and takes additional time.
    All that being said: NIO isn't simply "faster". It provides ways to implement non-blocking IO for tasks such as servers supporting a massive amount of connections and similar high-performance scenarios. If you simply want to read a file once, then "normal" IO will be perfectly fine for you.

  • Mysterious Teardown Problem with NIO

    I have an NIO proxy server which relays state information from a number of servers to a number of clients. A requirement for this system is that we can restart the proxy server (together with a couple of other components) from a web app.
    I tear down the proxy server by
    - interrupting out of the read loop
    - cancelling all keys associated with the channel
    - closing the socket on the channel
    - closing the channel.
    I do this for for both the input (server side) channel and the output (client side) channel.
    I then discard the proxy server, create a new one and start it up.
    Now here's the mysterious bit. The new server operates just fine for a minute or two. And then it stops seeing any input.
    The thread responsible for input reading freezes on the call to -
    myKeysAdded = myAcceptKey.selector().select();and the stack looks something like this:
    WindowsSelectorImpl$SubSelector.poll0(long, int, int[], int[], int[], long)
    WindowsSelectorImpl$SubSelector.poll() line: 270
    WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl$SubSelector) line: 252
    WindowsSelectorImpl.doSelect(long) line: 133
    WindowsSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 69
    WindowsSelectorImpl(SelectorImpl).select(long) line: 80
    WindowsSelectorImpl(SelectorImpl).select() line: 84
    ProxyServer$BrowserSelector.run() line: 123If I completely destroy the process (and the jvm) and start a new one everything goes back to working normally.
    Has anyone got any suggestions? I'm in hair-tearing mode on this one.
    Thx TOTW.

    I tear down the proxy server by
    - interrupting out of the read loopDon't you mean the select() loop?
    - cancelling all keys associated with the channelUnnecessary.
    - closing the socket on the channel
    - closing the channel.Only one of these is necessary. Closing the socket closes the channel and vice versa.
    When you have closed all the channels, you then need to call selector.selectNow() (search this forum for why), and then close the selector.

  • Java.nio select() method return 0 in my client application

    Hello,
    I'm developing a simple chat application who echo messages
    But my client application loop because the select() method return 0
    This is my code
    // SERVER
    package test;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.ServerSocketChannel;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    public class Server {
         private int port = 5001;
         public void work() {               
              try {
                   ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
                   serverSocketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(port);               
                   serverSocketChannel.socket().bind(isa);
                   Selector selector = Selector.open();
                   serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
                   System.out.println("Listing on "+port);
                   while(selector.select()>0) {
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();) {
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isAcceptable()) {
                                  ServerSocketChannel keyChannel = (ServerSocketChannel)key.channel();                              
                                  SocketChannel channel = keyChannel.accept();
                                  channel.configureBlocking(false);                              
                                  channel.register(selector, SelectionKey.OP_READ );
                             } else if (key.isReadable()) {
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  String m = Help.read(keyChannel );
                                  Help.write(m.toUpperCase(), keyChannel );
              } catch (IOException e) {                                             
                   e.printStackTrace();                         
         public static void main(String[] args) {
              Server s = new Server();
              s.work();
    // CLIENT
    package test;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class Client extends JFrame  {
         private String host = "localhost";
         private int port = 5001;
         private SocketChannel socketChannel;
         private Selector selector;
         public void work() {               
              try {
                   socketChannel = SocketChannel.open();
                   socketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(host, port);               
                   socketChannel.connect(isa);
                   selector = Selector.open();
                   socketChannel.register(selector, SelectionKey.OP_CONNECT | SelectionKey.OP_READ );
                   while(true) {
                        selector.select();
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();) {
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isConnectable()) {
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  if (keyChannel.isConnectionPending()) {
                                       System.out.println("Connected "+keyChannel.finishConnect());                                                                           
                             } else if (key.isReadable()) {                                                                                                                                                           
                                  SocketChannel keyChannel = (SocketChannel) key.channel();                                             
                                  String m = Help.read(keyChannel);
                                  display(m);                                                                                                                                                                                                                   
              } catch (IOException e) {                                             
                   e.printStackTrace();                         
         private void display(final String m) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        area.append(m+"\n");
                        textFieed.setText("");
         private void sendMessage(final String m) {
              Thread t = new Thread(new Runnable() {               
                   public void run() {                                                                                
                        try {                         
                             Help.write(m, socketChannel);
                        } catch (IOException e) {               
                             e.printStackTrace();
              t.start();                    
         public Client() {
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(1);
              textFieed.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e) {
                        if (e.getKeyCode()== KeyEvent.VK_ENTER) {
                             String m = textFieed.getText();
                             sendMessage(m);     
              area.setEditable(false);
              getContentPane().add(textFieed, "North");
              getContentPane().add(new JScrollPane(area));
              setBounds(200, 200, 400, 300);
              show();
         private String messageToSend;
         private JTextArea area = new JTextArea();
         JTextField textFieed = new JTextField();
         public static void main(String[] args) {
              Client s = new Client();
              s.work();
    // HELPER CLASS
    package test;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    import java.nio.CharBuffer;
    import java.nio.channels.SocketChannel;
    import java.nio.charset.Charset;
    import java.nio.charset.CharsetDecoder;
    import java.nio.charset.CharsetEncoder;
    public class Help {
         private static Charset charset = Charset.forName("us-ascii");
         private static CharsetEncoder enc = charset.newEncoder();
         private static CharsetDecoder dec = charset.newDecoder();
         private static void log(String m) {
              System.out.println(m);
         public static String read(SocketChannel channel) throws IOException {
              log("*** start READ");                              
              int n;
              ByteBuffer buffer = ByteBuffer.allocate(1024);
              while((n = channel.read(buffer)) > 0) {
                   System.out.println("     adding "+n+" bytes");
              log("  BUFFER REMPLI : "+buffer);
              buffer.flip();               
              CharBuffer cb = dec.decode(buffer);          
              log("  CHARBUFFER : "+cb);
              String m = cb.toString();
              log("  MESSAGE : "+m);          
              log("*** end READ");
              //buffer.clear();
              return m;                    
         public static void write(String m, SocketChannel channel) throws IOException {          
              log("xxx start WRITE");          
              CharBuffer cb = CharBuffer.wrap(m);
              log("  CHARBUFFER : "+cb);          
              ByteBuffer  buffer = enc.encode(cb);
              log("  BUFFER ALLOUE REMPLI : "+buffer);
              int n;
              while(buffer.hasRemaining()) {
                   n = channel.write(buffer);                         
              System.out.println("  REMAINING : "+buffer.hasRemaining());
              log("xxx end WRITE");

    Here's the fix for that old problem. Change the work method to do the following
    - don't register interest in things that can't happen
    - when you connect register based on whether the connection is complete or pending.
    - add the OP_READ interest once the connection is complete.
    This doesn't fix all the other problems this code will have,
    eg.
    - what happens if a write is incomplete?
    - why does my code loop if I add OP_WRITE interest?
    - why does my interestOps or register method block?
    For code that answers all those questions see my obese post Taming the NIO Circus
    Here's the fixed up Client code
    // CLIENT
    package test
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class Client extends JFrame  {
         private String host = "localhost";
         private int port = 5001;
         private SocketChannel socketChannel;
         private Selector selector;
         public void work() {
              try {
                   socketChannel = SocketChannel.open();
                   socketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(host, port);
                   socketChannel.connect(isa);
                   selector = Selector.open();
                   int interest = 0;
                   if(socketChannel.isConnected())interest = SelectionKey.OP_READ;
                   else if(socketChannel.isConnectionPending())interest = SelectionKey.OP_CONNECT;
                   socketChannel.register(selector, interest);
                   while(true)
                        int nn = selector.select();
                        System.out.println("nn="+nn);
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();)
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isConnectable())
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  System.out.println("Connected "+keyChannel.finishConnect());
                                  key.interestOps(SelectionKey.OP_READ);
                             if (key.isReadable())
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  String m = Help.read(keyChannel);
                                  display(m);
              } catch (IOException e) {
                   e.printStackTrace();
         private void display(final String m) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        area.append(m+"\n");
                        textFieed.setText("");
         private void sendMessage(final String m) {
              Thread t = new Thread(new Runnable() {
                   public void run() {
                        try {
                             Help.write(m, socketChannel);
                        } catch (IOException e) {
                             e.printStackTrace();
              t.start();
         public Client() {
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(1);
              textFieed.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e) {
                        if (e.getKeyCode()== KeyEvent.VK_ENTER) {
                             String m = textFieed.getText();
                             sendMessage(m);
              area.setEditable(false);
              getContentPane().add(textFieed, "North");
              getContentPane().add(new JScrollPane(area));
              setBounds(200, 200, 400, 300);
              show();
         private String messageToSend;
         private JTextArea area = new JTextArea();
         JTextField textFieed = new JTextField();
         public static void main(String[] args) {
              Client s = new Client();
              s.work();

  • NIO Socket implementation - delay between select and get data from socket

    Hi all,
    I have implemented a internal CallAPI for RPC over a socket connection. It works fine but if there are more than five clients and some load I have the phenomena that the READ selector returns a SelectorKey but I did not get any data from the socket.
    My implementation is based on NIO has following components:
    + Accept-Thread
    Thread handles new clients.
    + Read-Thread
    Thread handles the data from the socket for the registered client. Each request is handled in an own Process-Thread. A Thread-Pool implementation is used for processing.
    + Process-Thread
    The Process-Thread reads the data from the socket and starts the processing of the logical request.
    In my tests I get the notification of data at the socket. The Process-Thread want to read the data for the socket, but no data are available. In some situations if have to read about 20 times and more to get the data. Between each read attempt I have inserted a sleep in the Process-Thread if no data was available. This have improved the problem, but it already exists. I tested the problem with several systems and jvm's but it seams that it is independent from the system.
    What can I to do improve the situation?
    I already include the read implementation from the grizzly-Framework. But it doesn't improve the situation.
    Socket - Init
         protected void openSocket( String host, int port ) throws IOException
              serverChannel = ServerSocketChannel.open();
              serverChannel.configureBlocking( false );
              serverSocket = serverChannel.socket();
              serverSocket.setReuseAddress( true );
              this.serverhost = host;
              this.serverport = port;
              this.srvAcceptSelector = Selector.open();
              this.srvReadSelector = Selector.open();
              InetSocketAddress isa = null;
              if ( serverhost != null )
                   isa = new InetSocketAddress( this.serverhost, this.serverport );
              else
                   isa = new InetSocketAddress( this.serverport );
              serverSocket.bind( isa, 50 );
              serverChannel.register( this.srvAcceptSelector, SelectionKey.OP_ACCEPT );
         }New Client � Init
         // New Client
         if ( key.isAcceptable())
              keyCountConnect++;
              ServerSocketChannel actChannel =
                   (ServerSocketChannel) key.channel();
              // Socket akteptieren
              SocketChannel actSocket = actChannel.accept();
              if ( actSocket != null )
                   actSocket.finishConnect();
                   actSocket.configureBlocking( false );
                   actSocket.socket().setTcpNoDelay( true );
                   this.registerSocketList.add( actSocket );
                   this.srvReadSelector.wakeup();
         }Read Data from Socket
        protected int readDatafromSocket( ByteArrayOutputStream socketdata )
             throws IOException
             int readedChars = 0;
            int count = -1;
            Selector readSelector = null;
            SelectionKey tmpKey = null;
            if ( sc.isOpen())
                  ByteBuffer inputbuffer = null;
                 try
                      inputbuffer = bufferpool.getBuffer();
                      while (( count = sc.read( inputbuffer )) > 0 )
                           readedChars += count;
                          inputbuffer.flip();
                           byte[] tmparray=new byte[inputbuffer.remaining()];
                           inputbuffer.get( tmparray );
                           socketdata.write( tmparray );
                          inputbuffer.clear();
                      if ( count < 0 )
                           this.closeSocket();
                           if( readedChars == 0 )
                                readedChars = -1;
                           if ( log.isDebug())
                                  log.debug( "Socket is closed! " );
                      else if ( readedChars == 0 )
                           if ( log.isDebug())
                                  log.debug( "Reread with TmpSelector" );
                           // Glassfish/Grizzly-Implementation
                         readSelector = SelectorFactory.getSelector();
                         if ( readSelector == null )
                              return 0;
                          count = 1;
                          tmpKey = this.sc.register( readSelector, SelectionKey.OP_READ );
                         tmpKey.interestOps(
                              tmpKey.interestOps() | SelectionKey.OP_READ );
                         int code = readSelector.select( 500 );
                         tmpKey.interestOps(
                             tmpKey.interestOps() & ( ~SelectionKey.OP_READ ));
                         if ( code == 0 )
                             return 0;
                             // Return on the main Selector and try again.
                           while (( count = sc.read( inputbuffer )) > 0 )
                                readedChars += count;
                               inputbuffer.flip();
                                byte[] tmparray=new byte[inputbuffer.remaining()];
                                inputbuffer.get( tmparray );
                                socketdata.write( tmparray );
                               inputbuffer.clear();
                           if ( count < 0 )
                                this.closeSocket();
                                if( readedChars == 0 )
                                     readedChars =-1;
                           else if ( count == 0 )
                                  // No data
                 finally
                      if ( inputbuffer != null )
                           bufferpool.releaseBuffer( inputbuffer );
                           inputbuffer = null;
                      // Glassfish-Implementierung
                    if ( tmpKey != null )
                        tmpKey.cancel();
                    if ( readSelector != null)
                        // Bug 6403933
                         try
                            readSelector.selectNow();
                         catch (IOException ex)
                        SelectorFactory.returnSelector( readSelector );
            return readedChars;
        }Thanks for your time.

    I've commented on that blog before. It is rubbish:
    - what does 'overloading the main Selector' actually mean? if anything?
    - 'Although this not clearly stated inside the NIO API documentation': The API documentation doesn't say anything about which Selector you should register channels with. Why would it? Register it with any Selector you like ...
    - 'the cost of maintaining multiple Selectors can reduce scalability instead of improving it' Exactly. So what is the point again?
    - 'wrapping a ByteBuffer inside a ByteBufferInputStream:' Code is rubbish and redundant. java.nio.channels.Channels has methods for this.
    There is no a priori advantage to using multiple Selectors and threads unless you have multiple CPUs. And even then not much, as non-blocking reads and writes don't consume significant amounts of CPU. It's the processing of the data once you've got it that takes the CPU, and that should be done in a separate thread.
    So I would re-evaluate your strategy. I suspect you're getting the channel registered with more than one Selector at a time. Implement it the simple way first then see if you really have a problem with 'overloading the main Selector' ...

  • Why do I get IOException on nio read from channel before all data is read?

    I am working on an NIO based http client library but I've noticed two problems.
    #1: I have been testing against an http server that has authentication turned on. Hence, any request that comes its way will respond with a '401 Authentication Required' response. In the case of a POST, I've noticed that this particular http server does not wait for the body to arrive before responding. As soon as it gets the headers, it dumps the 401 response onto the channel and closes the connection. My library then gets an IOException on the next write to the channel even though I've received write interest event. (I'm using non blocking mode)
    Whether I get the exception depends on timing. Sometimes, my writes work and the exception is averted. Sometimes not. The longer I delay since the time I get the write interest event, the more likely it is the exception will occur.
    Now, in this situation, I really think it's the http server that is violating the http protocol. I give a valid content length that is not zero but it does not wait for me to finish my request. The moment I write the last empty line of the header section, it responds and closes the channel. Even though I don't think this is correct, my library has to deal with it. So in this situation, I've decided my library will abandon the write phase and move on to reading the response.
    NOTE: In the majority of cases, a client would have already authenticated by landing on some page that could produce a POST in the first place. However, for technical reasons I can't mention here, I must support the case that the very first (unathenticated) request to the server is a POST.
    2) After #1 above occurs, reading from the channel will also throw an IOException but only on Windows. Sometimes I get the headers only, sometimes the whole document, sometimes nothing. Again, the longer I delay reading (since the time I get the read interest event) the more likely it is the exception will be thrown. This NEVER happens on Linux. I always get the full response on Linux after the #1 happens even if I put long delays between reads.
    I can understand #1 happening but #2 should not. I can always see the complete response data on the wire using a network protocol analyser. The data is there every time but my library doesn't always get it.
    In situation 2, there is nothing I can do. If I don't receive the data, I have to respond with an error even though the request was successful.
    I have stripped down my library to the bare essentials and can reproduce the problem in a self-contained environment every time.
    Any ideas why the discrepency between Windows/Linux? Does this seem right?

    I read through the section you mentioned. I realize the connection may be dropped at any time. Handling this is no problem. It is reported as an exception to the client. However, this situation is different. I still see no provision that allows a server to respond to a half written request. A request is defined to include an optional message body (Section 5). The client dictates whether it is optional, not the server. Furthermore, section 6 clearly states "After receiving and interpreting a request message, a server responds with an HTTP response message.". To me, this implies the server must wait for the entire request before responding even if its a waste of time. This particular server is attempting to short circuit what I see is the required request/response cycle. In doing so, it is causing me some pain in trying to deliver its response since it seems on windows this interferes with my ability to read it.
    The simple answer to this is to process reads before writes, i.e. OP_READ before OP_WRITE. I tried this as well. Originally, I was not even registering READ interest while I was writing my request. (I saw no reason to. I don't want to give my client a response while they are writing their request.) But even when I do register READ interest while I'm writing (and process read events before write), the read event still produces no data and no eof (-1) indication on the read. The discrepency between linux and windows is bothering me. No matter what I do, I can't deliver the response even though its written to the channel by my peer. I think I will supply some code and see if anyone can get it to work on windows.Edited by: r2rossi on Sep 24, 2008 10:42 AMEdited by: r2rossi on Sep 24, 2008 10:43 AM
    Edited by: r2rossi on Sep 24, 2008 10:45 AM
    Edited by: r2rossi on Sep 24, 2008 10:46 AM

  • Problematic frame: # J java.nio.MappedByteBuffer.load()

    Helo all...
    I'm getting an error when generating a PDF using BIRT Framework in Eclipse. Nothing fancy, just compiling a simple report to pdf.
    The problem is, the JVM crashes with the following error:
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x0190f0be, pid=5848, tid=2392
    # JRE version: 7.0_09-b05
    # Java VM: Java HotSpot(TM) Client VM (23.5-b02 mixed mode, sharing windows-x86 )
    **# Problematic frame:
    # J java.nio.MappedByteBuffer.load()Ljava/nio/MappedByteBuffer;**
    # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
    # An error report file with more information is saved as:
    # C:\Users\luis\Desktop\teste\birt\hs_err_pid5848.log
    # If you would like to submit a bug report, please visit:
    # http://bugreport.sun.com/bugreport/crash.jsp
    I already tried:
    1. Run the program in another computers - it worked
    2. Reinstall Java on the computer - It did nothing
    3. I check the integrity of the disk C: - Nothing
    I already spent two days trying to fix this and I don't have any progress. I can't find a solution on the web either.
    Thanks in advance

    Thanks for the help.
    But it can not be related to BIRT because it works in every other computer that I tried so far. There is only one computer that not works properly.
    If it were BIRT's fault, it wouldn't work in any computer.
    Thanks again

  • Selector in NIO notifies data to be read but bytes read 0

    Hi All,
    I am facing a problem in NIO which for which I have clue.
    The selector object notifies that data is ready to be read from a particular channel after which
    I execute the following to read the data into the buffer
    readBuffer.clear();
    int count = this.sockChannel.read(this.readBuffer);
    The value of count which i get is 0 after which which i return without any processing
    but this notification goes on and on as I can see in the logs which goes on logging
    Count received as 0 infinitely.
    Please help

    There's a few things here.
    1. I prefer to see only one read statement in these loops, like this:
    while ((count = in.read(readBuffer)) > 0)
      readBuffer.flip();
      // get() from readBuffer into somewhere
    // NB the 'len' to use is 'count'. You don't need to get it again via 'position()'.
    // it generally makes more sense to use compact rather than clear() here
      readBuffer.compact();
    }2. count < 0 doesn' t mean the socket is closed, it means the connection is closed. You have to close the socket, or the channel, yourself, and I don't see that:
    if (count < 0)
      logger.debug("connection closed" ...); // etc
      in.close();
    }3. You're testing bytes.length > 0 in a place where it can't possibly be zero.
    4. I hope you're not really ignoring exceptions as shown. If you are, that would explain the behaviour completely - never do that. If you get any kind of an IOException in this code, the connection is hosed and you must log the exception and close the channel. The only exception to this rule is SocketTimeoutException, which doesn't happen in non-blocking mode.
    5. Is there any possibility that the buffer is zero length? That would cause read() to return zero.

  • SSLSocket to support NIO - feature request voting

    Hello All,
    I know there were many discussions here regarding this subject.
    I've seen the SSLEngine solution for the problem... But I didn't like it since it is too complicated.
    For my understanding SSLSocket inherits Socket so an application that can handle Sockets should be able to handle SSLSocket without writing a specific code besides the factory.
    NIO allows Socket to be none blocking... So why SSLSocket which is a Socket does not?
    If I write a Web server in Java, why should I deal with none SSL and SSL connections in a different way?
    I recently wrote one threaded NIO server and was amazed that I could not use SSL with the same implementation.
    I've opened a feature request for Java, but they told me to gain support for this subject here before they will consider it...
    As I understand I can re-implement SSLSocket to use SSLEngine and support NIO with blocking and none blocking support... But I think Sun should do it.
    One caveat is to make sure that the SSLSocket HandshakeCompletedListener should be called by a daemon thread, so that it will not block other sockets while certificate verification occur.
    Of course when I refer to SSLSocket I also refer to SSLServerSocket.
    Can you please comment regarding this issue... Every comment will be welcomed!
    Best Regards,
    Alon Bar-Lev

    nah, I am very glad they released an engine separate from transport allowing encryption on any transport.
    I am also working on an abstraction of nio that you may be interested in if you don't want to do the security yourself......it is here...
    http://sourceforge.net/projects/channelmanager
    Right now, it only contains the api, but there are 3 implementations behind it right now with 3 to be added.
    1. Basic implementation that does just nio
    2. Secure implementation that implements same api and uses implementation 1
    3. Packettizer implementation which puts things in payloads with headers and footers
    4. (to be added) Threadpool implementation allowing a threadpool to be inserted in the stack somewhere
    5. (to be added) TestProxy implementation allowing exxceptions to be thrown on purpopse to test a system on a bad network....can test failure on bind, connect, read, write, etc....everything.
    6. denial of service layer.
    7. Exception catch layer to protect #1 and #4 mainly from bad clients that throw exceptions back to the channelmanager.
    Each one of these layers (2 - 4) implements the same api and uses the same api so 2 -4 are all proxies. You can reorganize the proxies as you want.
    The secure one is almost done. Any comments on the api will be welcome.
    thanks,
    dean

  • How to find out how many memory is used for NIO

    is there any way to find out how many memory is used for nio in a virtual machine. ?
    I know that is possible to find out how many total, free and used memory the heap has by using java.lang.Runtime#totalMemory...
    We sometimes expect errors that it is not possible to create any more connections because of the NIO memory size but the heap is still ok. Today we had an error where 170mbytes of heap where left but it was not possible to create new tcp connections because of an exception:
    javax.naming.NamingException: java.net.SocketException: No buffer space available (maximum connections reached?): connect
    The number of TCP-Connections was ok (<500).
    It would be very nice if someone knows how to find out how the amount of memory that NIO buffers use can be determined within Java 1.4.
    best regards
    benjamin

    We have to use 1.4.2_03. This is because of the special environment we are running on.
    We did also figured out that there are some NIO Memory Bugs but we since we are not allowed to upgrade the used Virtual Machine we have to live with these errors.
    The problem that we currently have is within a Server and because of this circumstance we are trying to find a workaround or way to find out how many memory is allocated. If we would know how to get this value we could restart the servers as a workaround after the value reaches a threshold.
    We are also very sad that we can`t easily upgrade/update to the latest 1.4.2 Version or the newest 1.5 to get rid of these NIO Bugs!

  • Is this a bug of NIO???

    I am using nio to write a network server.
    I use following code to close a SocketChannel:
    Socket s = sc.socket();
              if (s != null) {
                   try {
                        s.close();
                   } catch (IOException e) {     
                        e.printStackTrace();
              sc.close();
    It works fine. But sometimes s.close() will throw a java.lang.Error, this will lead my server to crash!
    StackTrace:
    java.lang.Error: Untranslated exception
         at sun.nio.ch.Net.translateToSocketException(Net.java:65)
         at sun.nio.ch.SocketAdaptor.close(SocketAdaptor.java:354)
    Caused by: java.io.IOException: Unable to finish a non-blocking socket action (This error message is translated by me, I am not in USA)&#12290;
         at sun.nio.ch.SocketDispatcher.close0(Native Method)
         at sun.nio.ch.SocketDispatcher.preClose(SocketDispatcher.java:44)
         at sun.nio.ch.SocketChannelImpl.implCloseSelectableChannel(SocketChannelImpl.java:684)
         at java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:201)
         at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
         at sun.nio.ch.SocketAdaptor.close(SocketAdaptor.java:352)
         ... 18 more
    The error will be throwed if I called it N times, N < 2000.
    Runing env:
    WindowsXp, Amd dual core, 1G ram, JDK1.6.02
    The Logic of my test case:
    Server S listen to port 8080 with one select thread,
    Client A, Client B
    A connect to S, and send a package to get some resource, and A wait
    B connect to S, and send a package to get the same resource, This cause S cause Client A,
    A finds it disconnected, it reconnect and do the same as B
    B finds it disconnected, it reconnect too ....
    now, there is a loop.
    (all these are doing in the select thread)
    I think A and B will do these forever, but after some time( serveral seconds ), the Error will be thrown and
    server crashed.
    I google it, and I found nothing useful. Is this a bug??

    B connect to S, and send a package to get the same resource, This cause S cause Client A, A finds it disconnected, it reconnect and do the same as BI don't understand this. Why does anything done by B have anything to do with A? let alone making it reconnect? There is something seriously wrong with the application logic here if that's the result.
    NIO isn't that matureWell, it wasn't that mature in 1.4.0 or 1.4.1, but that's five years ago. Haven't found anything major in it for years.
    @OP: does it work better if you close the channel directly rather than its socket?

  • [java.nio] StreamCorruptedException when deserializing objects

    Hello everybody!
    I made a messaging (chat) program using java.io where all the client-server communication is done by serializing small objects. Now I would like to covert the server side to the NIO concept and I'm already struck. I successfully pass objects to the client and the client deserializes them, but only the first one! When it try to read the second it fails with a StreamCorruptedException.
    Here�s a sample (testing) code. In the server run() method I first serialize a string, then get its byte array from ByteArrayOutputStream and in the loop periodically send this byte array through the channel. On the client side I just read the deserialized object.
    Server run():
    public void run() {
            try {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(baos);
                oos.writeObject("abcdefgh");
                byte[] objectArr = baos.toByteArray();
                baos.close();
                oos.close();
                ByteBuffer buff = ByteBuffer.allocate(objectArr.length);
                buff.put(objectArr);
                buff.flip();
                while(true) {
                    selector.select();
                    Set keys = selector.selectedKeys();
                    for (Object o : keys) {
                        SelectionKey key = (SelectionKey)o;
                        if (key.isAcceptable()) {
                            ServerSocketChannel server = (ServerSocketChannel) key.channel();
                            clientChannel = server.accept();
                            if (clientChannel == null)
                                continue;
                            clientChannel.configureBlocking(false);
                            SelectionKey clientKey = clientChannel.register(selector, SelectionKey.OP_WRITE);
                        } else if (key.isWritable()) {
                            SocketChannel client = (SocketChannel) key.channel();
                            if (buff.hasRemaining()) {
                                client.write(buff);
                            } else {
                                buff.clear();
                                buff.put(objectArr);
                                buff.flip();
                    try {
                        Thread.currentThread().sleep(2000);
                    } catch (InterruptedException e) {
                        return;
            } catch (IOException e) {
                e.printStackTrace();
        }Client run():
    public void run() {
            try {
                soc = new Socket("localhost", 4000);
                ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());
                while(true) {
                    Object d = ois.readObject();
                    System.out.println("data = " + d.toString());
            } catch (Exception ex) {
                ex.printStackTrace();
        }At the second read I get a StreamCorruptedException.
    Apart from this I would like some hints in how to implement the application with NIO. For example how can I tell the objects apart on the client side � should I send every time a byte array before the object, which tells the length of the next coming object? This is probably not a 100% bulletproof solution and presents additional data transfer?
    Than you in advance!

    OK, I found a solution but I don't like it, because I don't understand it.
    The ObjectOutputStream adds a header (4 bytes) to the stream - if I send the array with those four bytes I get an StreamCorruptedException. If I send the array without the header I also get a StreamCorruptedException: "invalid stream header".
    If I reconstruct the object, by calling ObjectOutputStream.writeObject() and get it's byte array from ByteArrayOutputStream.toByteArray(), every time I have to fill the ByteBuffer, then it works.
    Here's the modified sending block, for the above example:
    } else if (key.isWritable()) {
                            SocketChannel client = (SocketChannel) key.channel();
                            if (buff.hasRemaining()) {
                                client.write(buff);
                            } else {
                                //* ---- added code ---------
                                baos.reset();
                                oos.writeObject("abcdefgh");
                                objectArr = baos.toByteArray();
                                buff.clear();
                                buff.put(objectArr);
                                buff.flip();
                        }   I really don't understand why I have to write the object in the object stream every time. I used ObjectOS and ByteArrayOS, to get the object byte array and then I thought I could forget about those streams and use this array to fill the ByteBuffer. What changes if I send the object through this process with every iteration (and how this harms speed - it's like sending everything twice)? If someone would explain this to me I would appreciate it much.

  • Use of the bug level variable  -Dsun.nio.ch.bugLevel=1.4

    Hi,
    I wanted to understand how java uses the variable sun.nio.ch.bugLevel .. and what is the value that it needs to be set. searching for this variable gave me a result where some one has set -Dsun.nio.ch.bugLevel=1.4 as the jvm option.
    ISSUE: I am randomly encountering a NullPointerException while calling Selector.open
    CAUSE:
    Here is the stack trace:
    "java.lang.NullPointerException
    at sun.nio.ch.Util.atBugLevel(Util.java:326)
    at sun.nio.ch.SelectorImpl.<init>(SelectorImpl.java:40)
    at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104)
    at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
    at java.nio.channels.Selector.open(Selector.java:209)
    This is cause due to a bug in java 1.5 (which has been fixed in Java 7)
    http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=9ea0db6110bd136e5288fa753945f?bug_id=6427854
    This bug has not yet been fixed in Java 1.5
    Here is the excerpt from the java 7 code:
    https://openjdk.dev.java.net/source/browse/openjdk/jdk/trunk/jdk/src/share/classes/sun/nio/ch/Util.java?rev=257&view=markup
    // -- Bug compatibility --
    private static volatile String bugLevel = null;
    static boolean atBugLevel(String bl) { // package-private
    if (bugLevel == null) {
    if (!sun.misc.VM.isBooted())
    return false;
    String value = AccessController.doPrivileged(
    new GetPropertyAction("sun.nio.ch.bugLevel"));
    bugLevel = (value != null) ? value : "";
    return bugLevel.equals(bl);
    java -version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
    Thanks in advance
    Vijay

    Hi Tim,
    This is a know issue, the bug has already been logged. Parameters(param1, param2 etc) works only on Non Repeating Heading Section, but not in Repeating Section and Non Repeating Footer Section.
    Thanks,
    Seshan K.

  • Java NIO locking and NTFS network resources

    Hi all - just ran into a really nasty situation and I was wondering if anyone else has hit it and might have some suggestions.
    Platform: JRE 1.4_02 on a Win XP machine
    The following test code locks a file, then copies it to another location using NIO.
    When I run it with source path on my local drives (C), it works fine. If I run it with source path on a network shared resource, it fails with an IOException with description 'Error performing inpage operation'.
    If I disable the lock immediately before the copy operation, it works fine.
    My conclusion is that there is something about the NIO locking implementation that prevents it from working properly with NTFS volumes on other hosts. Can this be right? I've found the following bug report:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4774175
    but this seems like a huge problem that would prevent folks from using NIO in many, many applications. Maybe I'm wrong on something here...
    Anyway, here's the test code:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.nio.channels.FileChannel;
    import java.nio.channels.FileLock;
    * Created on May 28, 2004
    * (c) 2004 Trumpet, Inc.
    * @author kevin
    public class test {
         private void createFile(File f) throws IOException{
              FileOutputStream os = new FileOutputStream(f);
              for(int i = 0; i < 10; i++){
                   os.write(i);
              os.close();
         public test() {
              boolean testWithReleasingLockPriorToCopy = false;
              final File f1= new File("w:/temp/test2.lok");
              final File f2 = new File("w:/temp/test.lok");
              f1.delete();
              f2.delete();
              try {
                   createFile(f1);
                   RandomAccessFile raf1 = new RandomAccessFile(f1, "rw");
                   RandomAccessFile raf2 = new RandomAccessFile(f1, "rw");
                   FileChannel ch1 = raf1.getChannel();
                   FileChannel ch2 = raf2.getChannel();
                   FileLock flock1 = ch1.lock();
                  if (!f2.getParentFile().exists() && !f2.getParentFile().mkdirs())
                       throw new IOException("Unable to create directories for destination file '" + f2 + "'");
                  if (testWithReleasingLockPriorToCopy)
                       flock1.release();
                   ch1.transferTo(0, raf1.length(), ch2);
                   raf1.close();
                   raf2.close();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args) {
              test t = new test();
    }Does anyone have any pointers here? I need to be able to exclusively lock a file on a network drive (preventing any other applications from opening it), then make a copy of it. I can't use regular stream operations, because the lock prevents them from working properly (it appears that, once you grab a file lock using NIO, the only way your application can use the file is via the NIO operations - using stream operations fails...).
    Thanks in advance for any help!
    - Kevin

    i've run into the same problem recently, channels working fine for local file locking, but when you turn to the network, they fail to accurately handle locks.
    i ended up writing a jni utility to ship with my java application that locks files using native windows calls.
    my .c file ends up looking something like this:
    JNIEXPORT jint JNICALL Java_Mapper_NativeUtils_LockFile
    (JNIEnv *env, jobject obj, jstring filename)
    const char* ntvFilename = (*env)->GetStringUTFChars(env, filename, 0);
    int retVal = (int)CreateFile
    ntvFilename
    , GENERIC_WRITE
    , FILE_SHARE_READ
    , 0
    , OPEN_EXISTING
    , FILE_FLAG_SEQUENTIAL_SCAN
    , 0
    //add code to throw java exceptions based on retVal
    if (retVal == (int)INVALID_HANDLE_VALUE)
    return retVal;
    (*env)->ReleaseStringUTFChars(env, filename, ntvFilename);
    return retVal;
    JNIEXPORT jboolean JNICALL Java_Mapper_NativeUtils_UnlockFile
    (JNIEnv *env, jobject obj, jint handle)
         CloseHandle((void *)handle);
    return 1;
    it's a little shy on the error checking side, but it provides support for network file locking that java seems to lack.

Maybe you are looking for

  • Multipathing configuration on RAC

    Hi All, Our storage team has configured multipathing after installation of Oracle 11gR2 RAC.All the Disk groups are coming under multipathing except OCR.When we are executing oracleam querydisk ocr it is howing only the starting number and end number

  • I have a mac and I downloaded the trial and it won't open

    Does anyone know why it reads can't open?  I downloaded the mac trial of Photoshop elements 8.

  • Add Z Field in XK99 Mass Maintenance

    Hello, We have Z field VEND_CATEGORY in LFA1. In XK99 want to add the Z Field which is currently not available. Please guide on the same. Thanaks Babu

  • Broadcast request 16:9 to 4:3

    I will be ask to convert 16:9 content to 4:3 for broadcast standard using FCP, is this possible and normal in a broadcast situation . Can anyone show me the steps .I have only work on SD 4:3 so far . Is there a filter or software in FCP i can use , a

  • Changing boot drive at startup

    I have a loan of a PBG3, 300 MHz running System 9.2. I have a scsi adaptor for it. I have multiple scsi drives, both external and internal from (1) a IIsi and (2) a performa 6300 CD. I could not get the IIsi to boot. However, the drive was spinning u