Date issue, need help on this one.

Can anyone show me the proper ways of how to update the SQL date type?
I can't insert records into table because of the "date" problem.
Thanks in advance.
Yee Hiong.
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;
class Personal extends JFrame{
      inpPanel1 inputPanel;
      btnPanel1 buttonPanel;
      dtPersonal data;
      Date dobDate, djDate; // this one... causes problems.
      String uri;
      Connection conn;
      Statement stmtAppendTable;
      ResultSet rs;
      public Personal(){
              super ("Personal");
              Container c = getContentPane();
              c.setLayout(new BorderLayout());
              inputPanel  = new inpPanel1();
              buttonPanel = new btnPanel1();
              buttonPanel.btnSave.addActionListener(new ActionListener()                   public void actionPerformed(ActionEvent ae) {
                              openDataBase();
                              appendRecord();
                              closeDataBase();
              c.add(inputPanel, BorderLayout.CENTER);
              c.add(buttonPanel, BorderLayout.SOUTH);
              pack();
              setVisible(true);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
      public void openDataBase() {
              uri = "jdbc:odbc:MABA";
              try {
                      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              }catch (ClassNotFoundException cnfex) {
                      System.out.println(cnfex.getMessage());
              try {
                      conn  = DriverManager.getConnection(uri);
                      stmtAppendTable = conn.createStatement(
                      ResultSet.TYPE_SCROLL_SENSITIVE,
                      ResultSet.CONCUR_UPDATABLE);
                      rs = stmtAppendTable.executeQuery("SELECT * FROM Personal");
              }catch(SQLException sqlex) {
                      System.out.println(sqlex.getMessage());
      public void appendRecord() {
              data = new dtPersonal();
              data.setID(Integer.parseInt(inputPanel.tfPersonalID.getText()));
              data.setName(inputPanel.tfName.getText());
              if(inputPanel.rbMale.isSelected()) {data.setSex("M");}
              else
              if(inputPanel.rbFemale.isSelected())
                      {data.setSex("F");}
              data.setAddress1(inputPanel.tfAddress1.getText());
              data.setAddress2(inputPanel.tfAddress2.getText());
              data.setAddress3(inputPanel.tfAddress3.getText());
              data.setCity(inputPanel.tfTownCity.getText());
              data.setState(inputPanel.cboState.getSelectedItem().toString());
              data.setContactPhone(inputPanel.tfContactPhone.getText());
              data.setHeight(Double.parseDouble(inputPanel.tfHeight.getText()));
              data.setWeight(Double.parseDouble(inputPanel.tfWeight.getText()));
              data.setStatus(inputPanel.tfStatus.getText());
              data.setDateOfBirth(inputPanel.tfDateOfBirth.getText());
              data.setDateJoined(inputPanel.tfDateJoin.getText());
              dobDate = Date.valueOf(data.getDateOfBirth());
              djDate  = Date.valueOf(data.getDateJoined());
              try {
                      rs.moveToInsertRow();
                      rs.updateInt("Personal_ID", data.getID());
                      rs.updateString("Name", data.getName());
                      rs.updateString("Sex", data.getSex());
                      rs.updateString("Address1", data.getAddress1());
                      rs.updateString("Address2", data.getAddress2());
                      rs.updateString("Address3", data.getAddress3());
                      rs.updateString("State", data.getState());
                      rs.updateString("Town", data.getCity());
                      rs.updateString("Contact", data.getContactPhone());
                      rs.updateDouble("Height", data.getHeight());
                      rs.updateDouble("Weight", data.getWeight());
                      rs.updateDate("Date_of_Birth", dobDate);
                      rs.updateDate("Date_Joined", djDate);
                      rs.updateString("Status", data.getStatus());
                      rs.insertRow();
                      System.out.println("Data Insert Successful");
              }catch(SQLException sqlex) {
                      System.out.println(sqlex.getMessage());
      public void closeDataBase() {
              try {
                      rs.close();
                      stmtAppendTable.close();
                      conn.close();
              }catch(SQLException sqlex) {
                      System.out.println(sqlex.getMessage());
      public static void main(String args[]){
              new Personal();
}

It crashes when I insert a record to Access's database. I remove the date data type then it runs fine. How to solve this date problem?

Similar Messages

  • Startup Screen Pixelated - I really need help on this one.

    15" Macbook Pro - Spring 2011
    My startup screen sometimes would be pixelated with the Apple logo and then would go to grey screen and do nothing... then I would be forced to shut down and power it up again. On two occasions, the bootup would have stripes on it. See photo.
    And then the occasional lockup while working on something would happen and I was forced to power it down. This would happen periodically and not every day.
    So... I had this problem a couple of months ago (for several months) and the Apple store kept my Macbook Pro for a few days and said there were reported no problems. They were clueless as to why I had the above screen show. They said... maybe it is a bad installation of the OS and that it got corrupted.
    So a couple of months later and I am now I am having the same issues again. But this time, I had bought another HD and installed Mountain Lion on it... and I have it connected via USB. I had used it several times before last night when I held the option key down to choose my startup disk to be the new HD via USB. Then I get this pixelated screen again, but this time it was at the startup disk screen. See Photo.
    It's like you have a car problem and you take it in to the shop only for it to not malfunction... I really need some guidance on this one. My AppleCare warranty just expired (was valid during my visit to the Apple Store)... And I am not a happy camper... I always use macs... and I teach everyone who has them how to use them.
    So to be clear... This is the same internal HD that I had when I took it to the Apple Store. (Lion)
    I installed Mountain Lion on a new HD connected via USB and have worked off of it for a few days with no problems, choosing it as a startup disk.
    Last night booting with the option key held down I get this pixelated screen, whereas before it was never pixelated holding the option key down.
    So I have a couple of questions:
    Is the Boot Screen above run by the motherboard or the HD? If it is the MB, then I need to talk with Apple again.
    Does anyone have any clue what is happening?I have reset my PRAM and switched out my RAM.
    If this screen is run by the same HD in the laptop, then maybe I just need to take it out....?
    I would appreciate any genius expertise. I am a little frustrated that I am having this problem and cannot narrow it down. I use my laptop extensively for presentation, graphics, and teaching and now I am afraid of it.

    Your 10.7 EFI may be corrupted.
    The way a Mac works is EFI is updated via Software Update, it's written to the OS X partiiton, then gets loaded into the hidden EFI partition and read/used upon the second boot.
    So it takes two reboots to load EFI and goes into the EPROM boot memory.
    My terminolgy might be inaccurate as I didn't take a Apple course for certification, but I understand a little about the boot stage from my Linux on Mac experience.
    If your 10.7 EFI is corrupted on one drive, and you've got a 10.8 clean EFI on another, then it takes two reboots from the same drive to clear and use it's EFI into boot memory.
    So if you've booted 10.7, then option booted to use 10.8, it could be the corrupted 10.7 EFI still in memory.
    The way to fix the corrupted 10.7 EFI partition is a total wipe and format of the entire drive to catch the hidden EFI parition, then install 10.7 fresh and update.
    Of course Apple made this difficult with Recovery Partition which won't allow a complete drive erase.
    However you can do this
    http://osxdaily.com/2011/08/08/lion-recovery-disk-assistant-tool-makes-external- lion-boot-recovery-drives/
    There is also a way to install EFI firmware from a cd, however I don't know where it goes, reboot the 10.7 drive twice anyway
    https://support.apple.com/kb/HT1237
    http://support.apple.com/kb/DL77
    Since your out of warrantly, you might want ot just go ahead and repalce the internal drive and see if that fixes the problem.
    http://eshop.macsales.com/installvideos/

  • I really need help on this one.

    Hello:
    When I first purchased my iPod nano a little over two years ago, I was able to download my itunes which amounted to about 400 songs. The capacity of this ipod is 4Gb. I restored it and downloaded 46 songs. It shows that I have only 1.5 Gb left. This doesn't make sense to me because it is much less than what I had before. Even with 400 songs, I had about 1.5 Gb left when it was new. It seems to me something is wrong with the ipod as it doesn't seem to be compressing. Anyone have any ideas about this? Is there a program that I am able to download to solve this issue? Thank you for any help you can give.
    Best regards,
    Mel or zzmel

    Thanks for your response. I don't know what the bit rate is. When I first got the nano, I was able to download in compressed format. For some reason I am unable to do that now and the few songs I have eats up a lot of memory. I have the latest iTunes and I tried to look into the options to see if there was anything that indicated compression. I could not find it. I have tried resetting the nano and cleared everything out. I again tried to transfer my library and the indicator showed that I have used about 1.5Gb and leaves me about 1.7Gb. I only have 42 songs on my nano. I wont even have 100 songs which will use all the memory or 3.7Gb. I must be doing something wrong and that is why I am seeking help. This never used to be this way. Thanks for your response.
    Mel or zzmel

  • REALLY need help on this one... befw11s4 w/ Xbox 360

    My system 2 PCs hard wired. 2 Printers wireless.  Running XP.  Also have Directv DVR and Xox 360.  Everything used to function correctly. Now DVR and XBox wont connect to BEFWS11 V2.  I have reset everything and started from scratch.  I have also disconnected everything from the LAN expect PC1 and Xbox.  The router appears to give it and IP address (shows up in DHCP table and on Xbox)  BUT  1- when I ping the address from my PC no response.  2 - when I run the test from XBox is says it gets IP address but can't see my computer.  I see very similar behavior from the DVR.  I did not change anything drastic that I am aware of.  I am at a loss - any experts out there.  I have turned off firewalls - no help.  This used to work and now does not.  On the Xbox I can't get either media sharing or Live to work.  I can get ping responses from 2 PCs and 2 printers on the netwrok, but not Xbox...
    I am stmped - any help out there?
    krammer

    Try assigning Ip addresses manually to the devices and check if you are able to communicate or not.

  • Infoset data issues need help ASAP

    Hello BW experts,
    I have created an InfoSet, to read data from one Single ODS. The ODS has already data active, but the Query on infoset doesn’t returns any data.also i checked in listcube `without any success.
    Could you please advise me where it might be wrong. i didn't changed anything in infoset. Just created a Infoset on top of ODS.
    I tried all the options and made sure that it's not authorization issue.i deleted the ods data and loaded some test data and tried to create a query on ods it's fetching the data but no data pulling by infoset.
    something wrong inbetween infoset and ods. could you please advise me what might be wrong and how can i resolve.
    might be some issues with the generated program or some issue with the database level.
    some of the infosets i created fectching partial data , some are getting full data from ODS and some of the infosets not at all picking the data. Overall i have created about 80 Infosets.
    We are in BW 3.5. Recently upgraded the patch successfully.
    Looking forward for your precious advise.
    Thanks,
    Naveen Reddy

    just tried to go through it again, and it was close to finishing, less than a 1/2 hour left. and it got the error: "the installer is experiencing errors installing onto "Macintosh HD". The disk may be damaged, please try installing on another disk."
    does that mean i'm going to have to buy a new internal hard-drive? once again any advice will be really helpful. Thanks
    p.s. I also went and verified the disk again and it said there wasn't any issues with it. and i repaired it anyways and it said it was fine. This is super annoying
    Message was edited by: Doonyal

  • Need Help on this one please

    I'm a newbie so I hope I can explain my problem satisfactory. My problem at hand is that I have, lets say a (JFrame) main class that does most of the work, within this class I instantiated another class that extends JFrame and pass it a Vector. Within in this new JFrame the user can choose among multiple checkboxes which will be used to sort the Vector. Also, there are two buttons, one to close out without doing anything and the another to sort the array with the users choices. My problem is, how do I pass the sorted vector back to another method within the main class to be used? Thank you for your help in advance

    Typically when you create an application it will contain a single JFrame. This is your main window and usually contains a menu, toolbar, etc. When you need additional information you would typically show a dialog. For example in Internet Explorer when you click on Tools / Internet Options you get a dialog which allows you to customize some options
    Also, when the user presses the Sort button how will that call the one method
    in the main JFrame I need to process the sorted vectorWhen you click the sort button you will have code that creates and displays the JDialog. Make this dialog "modal" so that execution in the main frame will be blocked until the dialog is closed. Then when the dialog closes code will continue executing after your dialog.setVisible(true), line of code in your action performed method.
    The memory for the Vector is allocated in your JFrame when you create the Vector. Your main frame passes the Vector as a parameter to the JDialog. When the Vector is sorted your main frame stills has a reference to the Vector

  • Really need help with this one!!

    hi all im posting here in the hope that some one can show me some light at the end of the tunnel as to my bb problem as its starting to get depressing now!
    long story short ive had bt bb for 4 weeks now and im paying for 8mg as thats the fastest my area can provide but my transfer speed is locked at 2mg maximum. countless phone calls later they said its a throughput issue and they will put a request in to reset my profile and everything will be fine. as i thought it didnt work. lots of phone calls later they said i had to wait 10 days after the request is put in for my speed to increase. waited 12 days and still nothing! more phone calls later they eventually sent an engineer round who said himself he cant see why my downloads are locked at 2 mg when after his own tests he said the line should be giving me at the very least a stable 6.5mg so he proceeded to put a request in of his own to a bt computer thats codenamed "rambo" to increase the speed to my house. he said i should see results after 4 hrs but in some rare cases its taken 72 hrs to kick in. so i ended up waiting 4 days and still **bleep** all. im so so sick of bt and all the **bleep** they are feeding me as they keep telling me every single time they say there gonna fix it that this time it will 100% fix my problem and it never does. really feel im being ripped off cos im paying for the top package in my area and im not getting anything anywhere near what i should be. can anyone please help with my problem it would be very much apreciated.
    thanks for reading all this peeps

    also heres the speed test results
    FAQ
    Test1 comprises of Best Effort Test: -provides background information.
    Download  Speed
    1840 Kbps
    0 Kbps
    2000 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 1840 Kbps
     For your connection, the acceptable range of speeds is 400-2000 Kbps.
     Additional Information:
     Your DSL Connection Rate :8128 Kbps(DOWN-STREAM), 448 Kbps(UP-STREAM)
     IP Profile for your line is - 2000 Kbps
    If you wish to discuss these results please contact your ISP.
    If you are experiencing problems with specific applications, servers or websites please contact your ISP for assistance.
    whats really getting to me now is bt keep admitting to me my acheivable speed should actually be in the region of 6.5 mg and my profile shouldnt be set to 2000kbps so if they know the problem themselves why cant they fix it

  • Frank, Steve still need help on this one

    When I click a return I want all iterators cleared. However, it does not. Here are some ways I have tried that. SecMenuView1 is master and SecMenuView2 is the detail if that helps!
    Did not work
    AppMenuAppModule service = new AppMenuAppModuleImpl();
    service.clearVOCaches(null, true);
    //access the Application Module DataControl
    AppMenuAppModuleImpl service =
    (AppMenuAppModuleImpl)ServiceUtils.getObjectReference("#{data.AppMenuAppModuleDataControl.dataProvider}");
    //check for any area targets or position targets created
    service.resetAppIdAndMenuIdForAppMenuView();
    AdfFacesContext context = AdfFacesContext.getCurrentInstance();
    context.getProcessScope().clear();
    /** Refresh Iterator Bindings - Dids not work ***********************/
    DCIteratorBinding itr1 = beanBindings.findIteratorBinding("SecApplicationView1Iterator");
    itr1.getViewObject().executeQuery();
    DCIteratorBinding itr = beanBindings.findIteratorBinding("SecMenuView2Iterator");
    itr.getViewObject().executeQuery();
    return "srchpage";
    null

    Sorry for the delay:
    Let me start again
    I have two tables. SEC_App and SEC_App_Menu. Let us say SEC_App_Menu is the child of SEC_App. Let us say, AppId="app1" has two menu rows in SEC_App_Menu ("app1", "menu1", "desc") and ("app1", "menu2", "desc"). "app1" and "menu1" are keys.
    I am doing a search in SEC_App_Menu for a particular App Id, say "app1", and I get the two rows. I select "app1", "menu2" and change its "descr" and commit. Now, I go back to search on "app1" and I should still see two rows for "app1." Instead, I get back only one row ("app1", menu2"). It is as if remembers the last row that was changed and committed. I want my master-detail to show two rows for detail, not one, when I select "app1". Sounds like something is not cleared and my select statements thinks I have only one row.
    Am I supposed to clear something in my views?

  • Another Videora Post- I just need help with this one problem, please!

    I am guessing that the best way to convert your videos to an iPod compatible format is Videora. It works lovely, except for one glitch. I notice that the audio is noticeably off when I play the video. Any solution on how to fix this? I would really appreciate it if anyone helped me out on this
      Windows XP  

    It is on both, I am thinking.. I tried it with a movie avi file, and it always comes out off.

  • AW 6 - I need help on this one.

    Have a few macs here but only one of them has this error when attempting to open AW documents. It's a G4 1.8 Ghz PM. And it only happens on one of it's internal hard drives running Tiger. Works fine in Leopard though.
    What am I doing wrong?
    Message was edited by: SDMacuser

    You're not doing anything wrong. This is an error that pops up occasionally & no one knows why it happens. Fortunately, Charlene found a fix & I then wrote this user tip for her.

  • I really need help on this one, please!

    So I'm trying to download terraria for mac, but my computer keeps telling me this can not be opened because it comes from an unidentified developer. Please help me!

    Johask wrote:
    But, there's no allow applications downloaded from: "Anywhere" button there.
    Should be......
    Having said that you can still right click and then press and hold 'Option' whilst clicking Open and gives a pass for that time.

  • Really need help on this one ! Tremolo sound in my guitar audio track.

    I did some fingerpicking with my acoustical guitar track of GB4. But can't for the life of me figure out how to to get rid of the tremolo sound. It sounds like I added a chorus effect. But recorded it straight with my mic.
    I went to prefrences but couldn't find anything that would help, Check all my effects in Details but turning off everything still didn't effect that troublesome chorus sound that shouldn't be there. I tried putting in "Basic Track" didn't work. "New Track" didn't get rid of the chorus sound. At first I thought i had it in the Vocal track and maybe I made it go away there but not in the acoustical guitar track.
    I installed East West Silver Symphony Au plugin into GB4 a while ago. I remember I had this problem before and I made it go way. But don't know how I did it.
    I took way all the volume lines Made them as low as they could go that were not used to prevent any sound bleeding!
    JUst don't know what to do cause I thought I tried everything. Hopefully I didn't .
    Thanks for any help! REally!

    Your so right, but I can't remember what my original tempo was.
    Any help would be appreciated! I think you hit the nail on the head. But now I am trying various tempos but not sure exactly what it was.
    But thanks for mentioning that !!!

  • I can't get ScrollPane.invalidate() to work.  Need help on this one.

    I have a dynamically created scrollpane who's content comes
    from a movieclip in the library.
    When I add this content from the library, I can't for the
    life of me get the scrollpane to correctly render the scrollbars.
    This is the code that I have. The movieclip in the library is
    linked as mc1 (width 100 height 46)
    import fl.containers.ScrollPane;
    import fl.controls.ScrollPolicy;
    import fl.controls.DataGrid;
    import fl.data.DataProvider;
    var aSp:ScrollPane = new ScrollPane();
    aSp.verticalScrollPolicy = "on";
    aSp.horizontalScrollPolicy = "on";
    var aBox:MovieClip = new MovieClip();
    drawBox(aBox);
    aSp.setSize(300, 300);
    aSp.source = aBox;
    addChild(aSp);
    function drawBox(box:MovieClip):void {
    var myMc1:mc1 = new mc1();
    myMc1.y = 50;
    myMc1.x = 50;
    box.addChild(myMc1);
    var mymc2:mc1 = new mc1();
    mymc2.x = 200;
    mymc2.y = 50;
    box.addChild(mymc2);
    }

    I figured it out. Nevermind.

  • JMF Datasource problem..i need help with this one error

    This the error i get when i try to run my program
    Error: Unable to realize com.sun.media.amovie.AMController@18b81e3Basically i have a mediapanel class that initialize and play the media as datasource
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.*;
    import java.net.URL;
    import javax.media.*;
    import javax.swing.JPanel;
    import java.nio.ByteBuffer;
    public class MediaPanel extends JPanel
       InputStream stream;
       String name = "";
       ByteBuffer inputBuffer;
       byte[] store = null;
       public MediaPanel( InputStream in )
       try{
          this.stream = in;
          //store stream as ByteBuffer
          store = new byte[stream.available()];
          stream.read(store);
          inputBuffer.allocate(store.length);
          inputBuffer.wrap(store);
          //get contentType
          DrmDecryption drm = new DrmDecryption();
          name = drm.naming;
          setLayout( new BorderLayout() ); // use a BorderLayout
          ByteBufferDataSource ds = new ByteBufferDataSource(inputBuffer,name);
          // Use lightweight components for Swing compatibility
          Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, true );
             // create a player to play the media specified in the URL
             Player mediaPlayer = Manager.createRealizedPlayer(ds);
             // get the components for the video and the playback controls
             Component video = mediaPlayer.getVisualComponent();
             Component controls = mediaPlayer.getControlPanelComponent();
             if ( video != null )
                add( video, BorderLayout.CENTER ); // add video component
             if ( controls != null )
                add( controls, BorderLayout.SOUTH ); // add controls
             mediaPlayer.start(); // start playing the media clip
           }catch(Exception e){}
       } // end MediaPanel constructor
    } // end class MediaPanelThe ByteBufferDataSource class is use to create the datasource for the player
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullDataSource;
    import java.nio.ByteBuffer;
    import java.io.IOException;
    import javax.media.MediaLocator;
    import javax.media.Duration;
    import javax.media.Time;
    public class ByteBufferDataSource extends PullDataSource {
    protected ContentDescriptor contentType;
    protected SeekableStream[] sources;
    protected boolean connected;
    protected ByteBuffer anInput;
    protected ByteBufferDataSource(){
    * Construct a ByteBufferDataSource from a ByteBuffer.
    * @param source The ByteBuffer that is used to create the
    * the DataSource.
    public ByteBufferDataSource(ByteBuffer input, String contentType) throws IOException {
    anInput = input;
    this.contentType = new ContentDescriptor(
                   ContentDescriptor.mimeTypeToPackageName(contentTyp  e));
    * Open a connection to the source described by
    * the ByteBuffer/CODE>.
    * The connect method initiates communication with the source.
    * @exception IOException Thrown if there are IO problems
    * when connect is called.
    public void connect() {
    sources = new SeekableStream [1];
    sources[0] = new SeekableStream(anInput);
    * Close the connection to the source described by the locator.
    * The disconnect method frees resources used to maintain a
    * connection to the source.
    * If no resources are in use, disconnect is ignored.
    * If stop hasn't already been called,
    * calling disconnect implies a stop.
    public void disconnect() {
    * Get a string that describes the content-type of the media
    * that the source is providing.
    * It is an error to call getContentType if the source is
    * not connected.
    * @return The name that describes the media content.
    public String getContentType() {
    return contentType.getContentType();
    public Object getControl(String str) {
    return null;
    public Object[] getControls() {
    return new Object[0];
    public javax.media.Time getDuration() {
    return Duration.DURATION_UNKNOWN;
    * Get the collection of streams that this source
    * manages. The collection of streams is entirely
    * content dependent. The MIME type of this
    * DataSource provides the only indication of
    * what streams can be available on this connection.
    * @return The collection of streams for this source.
    public javax.media.protocol.PullSourceStream[] getStreams() {
    return sources;
    * Initiate data-transfer. The start method must be
    * called before data is available.
    *(You must call connect before calling start.)
    * @exception IOException Thrown if there are IO problems with the source
    * when start is called.
    public void start() throws IOException {
    * Stop the data-transfer.
    * If the source has not been connected and started,
    * stop does nothing.
    public void stop() throws IOException {
    }i have a SeekableStream to manipulate the control of the streaming position.
    import java.lang.reflect.Method;
    import java.lang.reflect.Constructor;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    import java.nio.BufferUnderflowException;
    import javax.media.protocol.PullSourceStream;
    import javax.media.protocol.Seekable;
    import javax.media.protocol.ContentDescriptor;
    public class SeekableStream implements PullSourceStream, Seekable {
    protected ByteBuffer inputBuffer;
    * a flag to indicate EOF reached
    /** Creates a new instance of SeekableStream */
    public SeekableStream(ByteBuffer byteBuffer) {
    inputBuffer = byteBuffer;
    this.seek((long)(0)); // set the ByteBuffer to to beginning
    * Find out if the end of the stream has been reached.
    * @return Returns true if there is no more data.
    public boolean endOfStream() {
    return (! inputBuffer.hasRemaining());
    * Get the current content type for this stream.
    * @return The current ContentDescriptor for this stream.
    public ContentDescriptor getContentDescriptor() {
    return null;
    * Get the size, in bytes, of the content on this stream.
    * @return The content length in bytes.
    public long getContentLength() {
    return inputBuffer.capacity();
    * Obtain the object that implements the specified
    * Class or Interface
    * The full class or interface name must be used.
    * The control is not supported.
    * null is returned.
    * @return null.
    public Object getControl(String controlType) {
    return null;
    * Obtain the collection of objects that
    * control the object that implements this interface.
    * No controls are supported.
    * A zero length array is returned.
    * @return A zero length array
    public Object[] getControls() {
    Object[] objects = new Object[0];
    return objects;
    * Find out if this media object can position anywhere in the
    * stream. If the stream is not random access, it can only be repositioned
    * to the beginning.
    * @return Returns true if the stream is random access, false if the stream can only
    * be reset to the beginning.
    public boolean isRandomAccess() {
    return true;
    * Block and read data from the stream.
    * Reads up to length bytes from the input stream into
    * an array of bytes.
    * If the first argument is null, up to
    * length bytes are read and discarded.
    * Returns -1 when the end
    * of the media is reached.
    * This method only returns 0 if it was called with
    * a length of 0.
    * @param buffer The buffer to read bytes into.
    * @param offset The offset into the buffer at which to begin writing data.
    * @param length The number of bytes to read.
    * @return The number of bytes read, -1 indicating
    * the end of stream, or 0 indicating read
    * was called with length 0.
    * @throws IOException Thrown if an error occurs while reading.
    public int read(byte[] buffer, int offset, int length) throws IOException {
    // return n (number of bytes read), -1 (eof), 0 (asked for zero bytes)
    if ( length == 0 )
    return 0;
    try {
    inputBuffer.get(buffer,offset,length);
    return length;
    catch ( BufferUnderflowException E ) {
    return -1;
    public void close() {
    * Seek to the specified point in the stream.
    * @param where The position to seek to.
    * @return The new stream position.
    public long seek(long where) {
    try {
    inputBuffer.position((int)(where));
    return where;
    catch (IllegalArgumentException E) {
    return this.tell(); // staying at the current position
    * Obtain the current point in the stream.
    public long tell() {
    return inputBuffer.position();
    * Find out if data is available now.
    * Returns true if a call to read would block
    * for data.
    * @return Returns true if read would block; otherwise
    * returns false.
    public boolean willReadBlock() {
    return (inputBuffer.remaining() == 0);
    }

    can u send me ur DrmDecryption.java file so that i can help

  • I have firefox and I went to download my movies on a website and it won't download them because I need IE plug-in for Firefox for the 5.0 version need help on this one.

    I have a new computer and it has firefox on it of the 5.0 version and I went back to go download my movies from Blockbuster.com and I couldn't download them because I needed a IE plug-in for Firefox and the 5.0 does not work with it I need to go back and find if I can get a download of 4.0 version of firefox so I can get the IE plug-in for Firefox so I can download my movies.

    - Try going to Setings>Store and sign out of the account and then sign back in.
    - Reset the iPod. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears

Maybe you are looking for

  • A Request for help from me again! Yay!

    hi guys! I was working on implementing threads for the directions of the unit. When i press forward once...nothing happens, but when i press twice it gives me this HUGE list of errors. I dont have a clue. Again, any help would be appreciated. import

  • Is it possible to link from a Google Map to a DPS article?

    Hey everybody, I'm using DPS to produce an iPad travel magazine about Berlin. One feature shoul be a Google Map with all the Points Of Interest from the articles. I want to set links from the articles to the POIs which is possible as far as I know. B

  • In third-patry order,update of order billing status

    If i had activated billing-relevance indicator G for item categories in Customizing, whether billing can refer to the goods receipt quantity instead of the incoming invoice quantity.if the right,then during po not receive goods, whether order billing

  • Make fields only editable by certain useres

    hello, i have created several authorization schemes. In the "Security" section of a text field i can choose these so that the item is only displayed for authorized users. However, I would like everybody to see the text field, but only authorized user

  • Need Workflow materials to learn

    Hi All, I am new to workflow. Kindly suggest me Workflow materials to start from basic. Thanks and Regards, Myvizhi