Can't read byte array as word

I am reading a byte array from the database and trying to display it as a word document. This code works fine in FireFox but not in internet-explorer. I would greatly appreciate if someone can tell me what is wrong. this code works on a button click.


              public void buttonClick(ClickEvent event) {
                                     final byte[] word = getSampleWord();
                                    StreamResource resource = new StreamResource(new StreamResource.StreamSource() {

                                        public InputStream getStream() {
                                            return new ByteArrayInputStream(word);
                                        }
                                    }, docItem.getFormNumberOnScreen() + "_sample.doc", event.getButton().getApplication());
                                    resource.setCacheTime(500);
                                    resource.setMIMEType("application/msword");

                                    //show popup

                                    event.getButton().getApplication().getWindow("ArgoPI").open(resource,
                                            "_new",
                                            900,
                                            900,
                                            Window.BORDER_MINIMAL);
                                }

its working now. this post hepled:
https://vaadin.com/forum/-/message_boards/view_message/1396196