Castor unmarshalling and encoding

Usually I would post this at the Castor - forums, but they do not exist anymore. I always found Mailing lists suspect and cumbersome, so instead I will give it a shot here:
My goal is to read an xml file with the proper encoding as defined in the XML PI, using castor. The org.jdom.input.SAXBuilder uses the Encoding defined in the PI to read the XML file with the proper encoding. The Unmarshaller in Castor does not.
The Unmarshaller methods use 3 different XML sources, either java.io.Reader, org.xml.sax.InputSource or org.w3c.dom.Node. When using a Reader I must know beforehand what Encoding it should use. I thought of using a pre-parser which reads the PI before creating a Reader with the proper encoding. Does this sound like a fair solution, or have I missed something? Is there already any existing tools/libraries/classes which can read the PI of an XML file without much overhead?

Ehem.. perhaps I should try InputSource before discarding it as useless. The problem solved itself :-)

Similar Messages

  • How to decoding and encoding PNG and GIF images?

    I could decode and encode JPEG images using following create functions which are in com.sun.image.codec.jpeg package.
    JPEGImageDecoder decoder = JPEGCodec          .createJPEGDecoder(inputStream);
    JPEGImageEncoder encoder = JPEGCodec                    .createJPEGEncoder(outputStream);
    But I dont know required package and functions to decode and encode PNG and GIF images. Please help me.

    Is the API that hard to follow?
    ImageIO.read( file/stream/url)
    ImageIO.write( image, format (e.g. PNG, GIF(1), JPEG), file/stream what have you)
    1) Not sure if Java supports GIF saving, it might if you install JAI, or Java 6.

  • Using Max to rip and encode  cds but encountering problems

    I thought I'd use this software for a change something isnt quite right,On some cds the title artist and list of tracks appears as it should on Max window then the ripping and encoding commences.Only problem here is that i keep getting an ITunes file permission error which i have to delete each time .On other cds The Max window appears with nothing showing, the ripping and encoding starts but then seems to stop only to start importing in iTunes,I then stop this process to allow Max to continue but the end result is a iget a long list of unnamed tracks at the bottom of my itunes Music library.It seems like i havent got my settings quite right?? Could someone please advise me what the problem could be? thanks
    Message was edited by: angloargie

    You're problem is entirely different from the original poster's. You're more likely to get help if you start your own thread with a descriptive subject line. Include any error messages you're getting and any steps you've taken already to solve the problem.
    Best of luck.

  • How to retrieve version and encoding info from SAX parser

    I want to have access to the version and encoding info in a parsed XML document (when using SAX2). Who knows how this works?
    If not possible with SAX2, what other solutions are there?
    Second question: how to retrieve comments in XML files?
    Thanks in advance!

    thanks for answering, but ...
    LexicalHandler is fine for retrieving the comments,
    but does not give me the encoding (specified by
    encoding="UTF-8") and version (specified by
    version="1.0").
    I am feeding my parser with a byte stream, the parser
    resolves the correct encoding and i want to have
    access to this value!!hi , It is unlikely that you will get the encoding and version . This is being addressed by the DOM level3
    , see
    http://www-106.ibm.com/developerworks/xml/library/x-dom3.html?dwzone=xml .

  • Need HDV encoding for backup and encoding in windows.

    Need HDV codex for PC. rather than caputre back to tape then onto my PC with ASpect HD.
    I would like to encode a project and store it on my pc with little to no loss in quailty. Is there any type of codex that will keep te HDV quailty but plays and encodes with WINDOW MEDIA ENCODER? and what are the settings?
    I have done this with DV footage by going to export - Useing quicktime conversion: settings avi -Options - DVCPro. I can't seem to do them same useing HDV. I think the new FC6 can do this. but how?
    thnaks for your help
    Message was edited by: skatesurferdude

    You would need a utility that will encode to your desired format (AVI?). Such utilities would be Sorenson Squeeze, Autodesk Cleaner and Compression Master. Copy it to the Windows system after encoding. And yes, it will take a very long time unless you have a node cluster (render farm) of some sort so you are probably better off sending it back to tape and capturing it natively on the PC if you are wanting to work on the footage there. If you are just wanting to play the video on the PC then encode it.

  • Trouble Encoding out of Premiere CC and Encoder

    Hi, having trouble encoding from Adobe Premiere CC and Encoder. The files are .mts from a Canon C100 and when I play back in the timeline in Premiere my sequence looks great. But once I encode (either directly out of Premiere OR with Encoder) there is almost always a couple of spots in the mp4 that have a skip or dropped frame. (encoding H.264 High Bit Rate setting) - any ideas what might be causing this?
    [Text formatting corrected.  Please type your posts instead of pasting, which often leaves unwanted code throughout.]
    Message was edited by: Jim Simon

    Hi John,
    Using the latest version of Premiere CC on a Mac - OS 10.9.1.
    Using Magic Bullet Looks as a plug-in with Premiere but that is it.
    The files source is a Canon EOS C100 - .mts files.
    That seems to be all the info on that link mentioned, but I could be leaving out some crucial info?

  • Bit Rate and Encoding

    Hey y'all--
    I've read all the posts about this, but can someone please give me a simple answer (if one exists)?
    When I format (encode) my project, I would like to start with high settings then back-off when I run out of room on the DVD. The media (aside from Menus) is a series of 3min animated films (4 now, more later). My encode settings are as follows:
    FIELD ORDER: Auto
    MODE: Two Pass VBR
    BIT RATE: 5.0
    MAX BIT RATE: 7.5
    MOTION ESTIMATION: Best
    Is this a good place to start or should I up the bit rate settings? I'm just looking for a benchmark.
    Thanks in advance.
    G4 Dual 1.25; 2gigs Ram   Mac OS X (10.4.4)  

    Did you Google for a bitrate calculator as I suggested?
    http://www.videohelp.com/calc.htm
    With an audio bitrate of 192kbps (i.e. Dolby Digital encoded by Compressor 2 or A.Pack), it tells me that 90 minutes of video should be encoded at an AVERAGE bitrate of 6.6Mbps to fill a single DVD-R.
    If you want, you can do that as a constant bitrate encode of 6.6. You can also do a two-pass VBR encode with average of 6.6 and maximum of (say) 7.5 (because as David points out again, there are issues with high bitrate playback off of DVD-Rs).
    If you want to get more on the disc, encoded at a lower average bitrate.
    If you want to split it across two discs and encode everything at a high constant bitrate, you can do that too.
    If you are going to get this disc REPLICATED and therefore not have the DVD-R playback issues, you can encode all video at 9.5Mbps and fit 40 minutes onto a DVD-5, or 80 minutes onto a DVD-9.
    Or you can lower bitrates and resolutions dramatically and fit a lot more onto a single disc.
    It completely depends on your project, your delivery requirements, and your quality requirements.

  • Correlated analog and encoder readings with M-series

    Hardware: PCI-6220
    Driver: NI-DAQmx
    Software: VC++ 6.0
    My goal is to collect synchronized (correlated) analog and encoder readings to provide position-based voltage and current information.
    First question is regarding the potential alternatives and which is the best approach between these options:
    1) A single task that reads required analog and counter information into the same buffer, seems easy to align the data using this approach.
    2) A task to read analog data and a second task to read counter information, complicated by the need to reliably align the informatio from seperate buffers.
    Next question is simple: can the PCI-6220 read 2 seperate encoders?
    Hopefully, last question: where can I find documentation about where to connect A, B, and Z? So far all my searches have resulted in E series or 6602 counter examples and nothing on M series.
    Thanks, Ed

    Hi Ed,
    To answer your questions:
    >>First question is regarding the potential alternatives and which is the best approach between these options:
    >>1) A single task that reads required analog and counter information into the same buffer, seems easy to >>align the data using this approach.
    >>2) A task to read analog data and a second task to read counter information, complicated by the need to >>reliably align the informatio from seperate buffers
    First of all, option one is not actually an option because you cannot have one task acquire two different types of data (eg analog and counter data). Therefore, option two is the way to go. It is not as hard as it seems. You can use Channel Z to trigger the analag input channels and once the analog and counter channels are triggered at the same time their data will automatically be aligned.
    >>Next question is simple: can the PCI-6220 read 2 seperate encoders?
    The PCI 6220 has two 32 bit counter channels, so it is possible to read two separate encouders. Here is a link to the product data sheet for this card: http://sine.ni.com/apps/we/nioc.vp?cid=14130⟨=US
    >>Hopefully, last question: where can I find documentation about where to connect A, B, and Z? So far all my searches have resulted in E series or 6602 counter examples and nothing on M series.
    You are right, it is difficult to find out where to connect channels A, B, and Z! The easiest to find this information is to create an NI-DAQmx counter Task in MAX (Measurement and Automation Explorer). Once you have followed all of the steps to create the task you will see the task information in the middle of the screen. There will be a settings tab and inside this tab it will tell you what pins to connect A, B and Z to. I went ahead and created tasks for ctr 0 and 1 in MAX to get the information on which pins to connect to A, B, and Z.
    For ctr0: For ctr1:
    A: PFI8 PFI3
    B: PFI10 PFI11
    Z: PFI9 PFI4
    Please let me know if you have any further questions. Have a great day!
    Jennifer

  • Font sizing and Encoding information are reset each time

    I am using iSql*plus against a UTF8 database to view multilingual text .. I found that I have to reset the encoding and the size information on the IE browser each time I execute a SELECT statement ...
    For example I have select ename from emp ... Now change my encoding to UTF8 and Font size to Large ... Next amend the statement to select one more column say deptno, the sizing and encoding information is reset and I need to set them again .. Is this a known issue ?
    null

    Peter,
    We've managed to reproduce the problem in-house. It doesn't seem to occur in Navigator, but does in IE. I suspect it may be a problem with IE, but I'm not sure. I've logged a bug and it will be looked at.
    Thanks for reporting it.
    Alison
    iSQL*Plus Team

  • Encore Project Settings and Encoded file is less in Encore than on my Drive.

    Hi,
    Before Encoding my Premiere Pro timeline in Media Encoder, I had set up my all my menus and all my assets in Encore CS 5.1. After I had done all that, I pressed the "Build button and it said I had around 23 GB left (I am making a Blu-Ray DVD)
    So I went back to Premiere Pro CS 5.5 and Encoded my Project through Media Encoder. I set it it H.264 Blu-Ray, PCM Audio, Target Bit Rate was 18.5 and Max Bit Rate was 20. The estimated file size said it was going to be around 23 GB. This was perfect.
    So I encoded it and when it was done, on the Hard Drive, it was 23 GB, just like to was supposed to be.
    I then imported it into my Encore project and put it on the timeline. I then looked at the Build tab to see how many GB I had left on the Disc. I wanted a little room.
    It said I am only using just over 20 GB and have a little over 4 GB left to use..
    Why would this happen? I now have more free space.
    In Encore, I wento to File ------ Project Settings ------ Default Transcode settings ---- and that was set at:
    Max Audio/Video
    Codec MPEG 2
    Bit Rate = 15 MBPS.
    The Audio was on Dolby.
    There was a drop down list, in the Bit Rate category, that I could have chosen to use 20 or 25. I left it at 15 for now.
    If I go back and choose 20 or 25 would that make the encoding of my whole project (Menus and h.264 Blu-Ray) a little better quality than it is now? Will it increase the size of Encoded project so when I hit the Build tab again it will show I have less space available to use? I want to make the project  as good as it can get without going over the 25 GB limit.
    One other thing.
    Wih my final project on the Encore Timeline, when I have the Sequence active, on the Project tab in Encore it reads: 19.1 GB Encoded (Audio and Video). the final encode is 23 GB. Why is it going down to 19?
    The video looks good and I could burn it to a Blu-Ray now and it would look great. I just want to know if there is some way to make it a little better inside Encore without having to Encode my whole project at a higher Bit Rate knowing that It will be a little less when I bring it into Encore.
    Thanks in advance
    Premiere Pro CS 5.5
    Media Encoder 5.5
    Encore 5.1

    Many issues in this; one problem is understanding file sizes and Encore's handling of project panel sizes and build panel sizes.
    See post 7 here:
    http://forums.adobe.com/message/4838089#4838089
    Regarding bitrate calculators and a shorthand method mentioned by Jeff Pulera, see his post 2 in that same thread. I see that it was regarding DVD; I wonder if someone has a shorthand like that for Bluray?

  • Best doctype and encoding?

    What is the best doctype and encoding to use for web pages these days?

    I do most of my sites in ISO-8859-1 since most have to have a Spanish section and the accents work easier.
    Recently had to change one over to UTF-8 for a russian section and that's when I discovered something new...
    my russian pages would not display once uploaded and a I spent a couple of days trying to figure out why...
    turns out you have to make sure (at least with my server) that the server is using the same encoding as you are
    my server - being in Spain - used ISO as default - so I had to ask them to switch it over to UTF-8 and then my page worked fine.
    just watch out for that if you start switching your page encodings.
    of course this also means that I had some issues with other pages , since the server will only use one encoding for all the pages on a site
    worth bearing in mind - particularly if you do a lot of multilingual stuff as I do...

  • The Latest Premiere and Encoder update enlarged everything

    Hi everyone,
    I just updated my Premiere Pro (8.2.0.65)and Encoder CC (8.2.0.54),
    and for some reason the display both softwares got bigger.
    It begins with the opening screen of the software (attached) which is unproportionally big.
    More than that, all of the fonts and in-software display in bigger and extremely inconvenient.
    I have looked after this problem and did not find any references of this problem.
    Anyone?

    Every time I've try to export from Premiere Media Encoder gives me this error message that says: Installation error - please ensure this product have been installed properly.
    I can't find a way to only reinstall media encoder from CC
    It was working fine before the last Premeire update.

  • Muvo n200, lower level voice recored and encoded, and wanna configue EQ in FM m

    I read the topic about Muvo n200 for a few day. I have a problem same as all of you. My problem is I cannot hear the voice that I recorded in my lecture room. Sounds like Ohh Uhh Umm, I cannot catch the word and the sound is low level. Firstly, I think it's from the plastic cover but after I pull it out the sound is same as before I put out. And encode function is low level noise, I should recorded in high level but the sounds is very bad.
    And I don't know why I cannot configue qualizer in FM mode. I like the the sound when I configue equalizer in Music mode, but FM mode cannot. This make me disappoint very much.
    I hope a new firmware of N200 will coming soon and it should be configue my problem that I'm bore.
    the_newkung

    The microphone is quite short range.
    Sounds like EQ with the radio is a wishlist item. Hopefully one of the moderators will log it for you, or you can send it direct to support.

  • Adobe After Effects, Premiere and Encoder does not use the GPU (CUDA) ?

    Please! Explain me. Why? Adobe After Effects, Premiere and Encoder does not use GPU (CUDA) ?
    Everytime i have GPU Load from 0 to 10% !!! (GeForce GTX 970) And also my CPU load is not full. Any suggestions?

    seg.48162731 wrote:
    At the moment i use AE, AP and ME CC 2014 8.2 with the latest updates. I have GTX 970 and AMD 8350. What's my problem?
    Which chipset is on your system's motherboard? Which motherboard is your PC equipped with?
    If the motherboard is using an AMD 790 or 970 series chipset, the HyperTransport bus will be running at a reduced speed, and thus the CPU performance will be worse than a quad-core Intel i5 CPU without hyperthreading. In many instances, this means that the GPU will be laying idle, waiting for the CPU to catch up.
    If on the other hand the motherboard uses an AMD 990FX chipset, then it's likely that there is something else bottlenecking your PC.

  • A/V capture in java and encoding in windows media 9 format

    Hi,
    Is it possible to capture using java and encode it in windows media 9 format ? If so how would one do it ? Thanks.
    KM

    Hey, I am trying to find out how to do this as well.
    This line throws an exception:
    Player player = Manager.createRealizedPlayer( mediaURL );
    Have either of you gotten further?

Maybe you are looking for

  • Can I use iCloud services on IOS safari?

    When I try to access iCloud thriugh Safari on my IOS 5 mobile devices it show the welcome screen wih a little lock.  iCloud is installed on both the iPad 2 and iPhone 4.  I'm unable to get past this screen.

  • Possible Motherboar​ds for C855

    Hello, I own a Toshiba Satellite C855-12K, I have owned it for about 3 years, but 2 weeks ago, I accidentally damaged the motherboard, while I was cleaning the computer, at first I thought it was the display or video card that has broken, because it

  • Installing a better Hard Drive in my MacBook Pro

    Hey guys, I'm looking to install a better hard drive into my MacBook Pro (15.4" Intel Core 2 Duo 2.2 Ghz) that I bought last September, and I'm strictly a software guy: I know little to nothing about hardware. I'm hoping to upgrade from a 120 GB to a

  • Email Notification from OIM 11g

    Hi , Can anyone please explain in detail steps , how to configure /send notification from SOA . As i need to send notification to end user/manager etc..when an approval workflow is finished . Regards Sid

  • IPod touch 5 disabled/locked

    Hello, I have an iPod touch 5, with iOS 7, and I forgot the screen lock code, so it got disabled and the screen says "iPod disabled, please contact iTunes." My problem is that I have never made an iCloud backup, so I need to know if there is any way