Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.AttributeHolder


     */
    protected synchronized void readList() {
  File file = getFile();
  try {
      Reader reader = new BufferedReader(new FileReader(file));
      AttributeHolder holders[] =
    serializer.readAttributeHolders(reader);
      for (int i = 0 ; i < holders.length ; i++)
    addEntry((PutedEntry)holders[i]);
  } catch (Exception ex) {
      // FIXME
View Full Code Here


     */
    protected synchronized void readPubList() {
  File file = getPubFile();
  try {
      Reader reader = new BufferedReader(new FileReader(file));
      AttributeHolder holders[] =
    serializer.readAttributeHolders(reader);
      for (int i = 0 ; i < holders.length ; i++)
    addPubEntry((PutedEntry)holders[i]);
  } catch (Exception ex) {
      // FIXME
View Full Code Here

     */
    protected synchronized void readDelList() {
  File file = getDelFile();
  try {
      Reader reader = new BufferedReader(new FileReader(file));
      AttributeHolder holders[] =
    serializer.readAttributeHolders(reader);
      for (int i = 0 ; i < holders.length ; i++) {
    DeletedEntry e = (DeletedEntry) holders[i];
    e.confirm();
    addDelEntry(e);
View Full Code Here

      }
  }
  entries = new Hashtable(256);
  try {
      Reader reader = new BufferedReader(new FileReader(indexFile));
      AttributeHolder holders[] =
    serializer.readAttributeHolders(reader);
      for (int i = 0 ; i < holders.length ; i++) {
    NewStoreEntry entry = (NewStoreEntry) holders[i];
    entries.put(entry.getKey(), entry);
    synchronized (lru) {
View Full Code Here

  File rmstate = new File(storedir, STATE_F);
  try {
      FileOutputStream fos = new FileOutputStream(rmstate);
      OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
      Writer writer = new BufferedWriter ( osw );
      AttributeHolder statearray[] = { state };
      serializer.writeResources(statearray, writer);
  } catch (Exception ex) {
      // FIXME !!
      System.out.println("ResourceStoreManager: unable to save state !");
      ex.printStackTrace();
View Full Code Here

  File rmstate = new File(storedir, STATE_F);
  try {
      FileOutputStream fos = new FileOutputStream(rmstate);
      OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
      Writer writer = new BufferedWriter ( osw );
      AttributeHolder statearray[] = { state };
      serializer.writeResources(statearray, writer);
  } catch (Exception ex) {
      // FIXME !!
      System.out.println("ResourceStoreManager: unable to save state !");
      ex.printStackTrace();
View Full Code Here

  File rsmstate = new File(storedir, STATE_F);
  // Restore it:
  Reader reader = null;
  try {
      reader = new BufferedReader( new FileReader(rsmstate));
      AttributeHolder states[] = serializer.readAttributeHolders(reader);
      this.state = (ResourceStoreState) states[0];
  } catch (Exception ex) {
      // Let's try to fix this:
      this.state = salvageState();
  }
View Full Code Here

            Reader reader)
  throws IOException
    {
  synchronized(generation) {
      generation.clean();
      AttributeHolder ah[] = null;
      try {
    ah = serializer.readAttributeHolders(reader);
      } catch (SerializationException ex) {
    String msg = "XML Serialization, load failed : "+
        ex.getMessage();
View Full Code Here

     * @param writer, a Writer, the writer used to serialize this generation
     */
    public void write(AttributeHolder holder, Writer writer)
  throws IOException
    {
  AttributeHolder holders[] = { holder };
  try {
      serializer.writeResources(holders, writer);
  } catch (SerializationException ex) {
      String msg = "XML Serialization, save failed : "+
    ex.getMessage();
View Full Code Here

     */
    public AttributeHolder read(Reader reader)
  throws IOException
    {
  try {
      AttributeHolder holders[] =
    serializer.readAttributeHolders(reader);
      if ((holders != null) && (holders.length > 0)) {
    return holders[0];
      } else {
    throw new IOException("empty!");
View Full Code Here

TOP

Related Classes of org.w3c.tools.resources.AttributeHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.