Thread: Instanciating?

Results 1 to 4 of 4
  1. #1 Instanciating? 
    Registered Member

    Join Date
    Oct 2009
    Posts
    115
    Thanks given
    3
    Thanks received
    5
    Rep Power
    105
    I need some help.

    I'm trying to use this,

    Code:
    	RSOutputStream.setBuffer(new byte[1024]);
    to call on this,

    Code:
    	public RSOutputStream(int capacity) {
    		setBuffer(new byte[capacity]);
    	}
    
    	public RSOutputStream(byte[] buffer) {
    		RSOutputStream.setBuffer(buffer);
    	}
    but I can only get it to work without errors like this,

    Code:
    	public void name() {
    	RSOutputStream.setBuffer(new byte[1024]);
    	}
    But I want it to work without being in a void.

    Any idea how?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2009
    Posts
    45
    Thanks given
    5
    Thanks received
    12
    Rep Power
    189
    Code:
    RSOutputStream oStream = new RSOutputStream(new byte[1024]);
    I think. Can you post the error?
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member

    Join Date
    Oct 2009
    Posts
    115
    Thanks given
    3
    Thanks received
    5
    Rep Power
    105
    Quote Originally Posted by Wreck View Post
    Code:
    RSOutputStream oStream = new RSOutputStream(new byte[1024]);
    I think. Can you post the error?
    That seems to have worked. Thanks. +Rep for the help
    Reply With Quote  
     

  5. #4  
    Registered Member
    Shamon King's Avatar
    Join Date
    Aug 2007
    Posts
    3,335
    Thanks given
    90
    Thanks received
    228
    Rep Power
    1363
    Code:
    	public RSOutputStream(byte[] buffer) {
    		return RSOutputStream.setBuffer(buffer);
    	}
    I think that may work...
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •